Comments (18)
I'm seeing this same error in gh version 2.30.0
, installed the extension just now. The workaround that worked for @gugaiz above did not work for me.
from gh-actions-cache.
Hi @gugaiz, have you logged in into gh cli
before executing the command?
Please use gh auth login
to login to your GitHub account to be able to access your repo.
from gh-actions-cache.
Hi @kotewar, thanks for your answer. I am already logged into gh
. For example, if I run gh pr list
on the repo directory, it works
from gh-actions-cache.
Hi @gugaiz, looks like it is a known thing, please refer this and let me know if the problem gets resolved for you.
from gh-actions-cache.
@kotewar, not sure if I explained myself right... What I meant was that if I run gh pr list
I see all the pull requests for my repo, so it means that I am already logged, but if under that same repo I run gh actions-cache list
, it does not work
from gh-actions-cache.
What is the output of git remote -v
?
from gh-actions-cache.
$ git remote -v
origin [email protected]:<company>/<repo-name>.git (fetch)
origin [email protected]:<company>/<repo-name>.git (push)
from gh-actions-cache.
Is your company using GHES (GitHub Enterprise Server) by any chance?
from gh-actions-cache.
Not that I am aware of... is there any way to confirm that?
from gh-actions-cache.
Looking at your origin, it seems you are using the github.com site and not any enterprise instance.
Can you please paste the output of gh --version
? I am unable to reproduce the issue. Just want to confirm what gh cli
version you are using.
Also can you please enable verbose logging, by exporting an env variable GH_DEBUG=true
, and share the logs?
from gh-actions-cache.
$ gh --version
gh version 2.14.4 (2022-08-10)
https://github.com/cli/cli/releases/tag/v2.14.4
I exported the GH_DEBUG variable but didn't see any output
$ export GH_DEBUG=true
$ gh actions-cache list
[actions-cache list] -> [actions-cache list]
Error: unable to determine current repository, none of the git remotes configured for this repository point to a known GitHub host
Usage:
gh-actions-cache list [flags]
Flags:
-B, --branch string Filter by branch
-h, --help help for list
--key string Filter by key
--limit int Number of items to fetch between 1 and 100 (default 30)
--order string Order of caches returned (asc/desc)
-R, --repo string Select another repository for finding actions cache.
--sort string Sort fetched caches (last-used/size/created-at)
from gh-actions-cache.
Hi @gugaiz Will it be possible to explicitly give repo just to confirm where is the problem? Try something like this
gh actions-cache -R <org>/<repo-name>
from gh-actions-cache.
Hi @t-dedah I did:
$ gh actions-cache list -R <org>/<repo-name>
Error: authentication token not found for host github.com
Then I ran:
$ gh auth login
? What account do you want to log into? GitHub.com
? You're already logged into github.com. Do you want to re-authenticate? (y/N) y
....
Then it worked!, for some reason, that was not very clear, I was already logged but was not working for cache but it did work for another commands.
from gh-actions-cache.
Thats awesome @gugaiz
from gh-actions-cache.
@t-dedah thanks for all your help!
from gh-actions-cache.
@t-dedah
Hi~
I face the same problem but with GHES
3.6.x
. I want to know that how can I solve this problem. Thanks~
gh actions-cache list -R <[HOST/]owner/repo
Error: authentication token not found for host xxx.xxx.xxx
And I can get cache list data by using gh api
.
# GitHub CLI api
# https://cli.github.com/manual/gh_api
gh api \
-H "Accept: application/vnd.github+json" \
--hostname HOSTNAME \
/repos/OWNER/REPO/actions/cache/usage
from gh-actions-cache.
I am also still seeing this
from gh-actions-cache.
Same here.
$ gh version
gh version 2.30.0 (2023-05-30)
https://github.com/cli/cli/releases/tag/v2.30.0
$ gh extension list
gh actions-cache actions/gh-actions-cache v1.0.3
$ gh actions-cache list --repo redislabsdev/next-gen
Error: authentication token not found for host github.com
$ gh auth login
? What account do you want to log into? GitHub.com
? You're already logged into github.com. Do you want to re-authenticate? Yes
? What is your preferred protocol for Git operations? SSH
? Upload your SSH public key to your GitHub account? Skip
? How would you like to authenticate GitHub CLI? Login with a web browser
! First copy your one-time code: 0E50-42B1
Press Enter to open github.com in your browser...
✓ Authentication complete.
- gh config set -h github.com git_protocol ssh
✓ Configured git protocol
✓ Logged in as zcahana
$ gh actions-cache list --repo redislabsdev/next-gen
Error: authentication token not found for host github.com
from gh-actions-cache.
Related Issues (20)
- Clarify how remote is selected HOT 2
- restore-keys: | npm-feature-${{ hashFiles('package-lock.json') }} npm-feature- npm- HOT 2
- violethaze74-gh-cli
- Ability to list cache content HOT 3
- v1.0.2 requires a version of glibc that is not available on the current 'ubuntu-latest' Github runner HOT 10
- Unable to use branch filter to filter "master" branch caches HOT 7
- Return the empty caches message as error log, not standard log
- This is a great tool, but I'd also like to see a way to do the same with repo artifacts HOT 4
- Add date filter
- List caches not in specified branch list HOT 1
- Tests don't pass when executed from tarball HOT 1
- Support for GitHub Enterprise Server HOT 1
- version `GLIBC_2.32' not found on Debian bullseye HOT 7
- "Add support for secure token storage" HOT 4
- filter output column to print only cache entry key
- Feature: delete --ignore-not-found
- Feature request: Pagination support
- Error: authentication token not found for host github.com HOT 6
- Title HOT 3
- Document that `actions: read/write` permissions are required to use gh-actions-cache in gh actions CI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gh-actions-cache.