Closed Alegrowin closed 1 year ago
Same here, using act v0.2.31 and a known good github token (which is also present in the current env, but figured I'd explicitly pass it into act as well):
act -v -j Test -s GITHUB_TOKEN=$(pass api.github.com | head -1) -W ./.github/workflows/rubyonrails.yml --env-file .env.test
...
Ruby on Rails CI/Test] ☁ git clone 'https://github.com/ruby/setup-ruby' # ref=v1
[Ruby on Rails CI/Test] [DEBUG] cloning https://github.com/ruby/setup-ruby to /home/jon/.cache/act/ruby-setup-ruby@v1
[Ruby on Rails CI/Test] Unable to clone https://github.com/ruby/setup-ruby refs/heads/v1: authentication required
[Ruby on Rails CI/Test] [DEBUG] skipping post step for 'Install Ruby and gems'; step was not executed
[Ruby on Rails CI/Test] [DEBUG] skipping post step for 'Checkout code'; step was not executed
I just ran into this issue as well (on Windows) and I could solve it by logging out of Docker Desktop, as hinted on by https://github.com/nektos/act/issues/1166#issuecomment-1133637204
Issue is stale and will be closed in 14 days unless there is new activity
I got this same error when I had incorrect GITHUB_TOKEN
value.
Generating new one which started with ghp_
and assigning this fixed Error: authentication required
I know it's an old issue, but it has high hits on google.
I had this issue when using the scoop install with act -s GITHUB_TOKEN="$(gh auth token)"
but just uninstalled the scoop package and used the gh extension gh extension install https://github.com/nektos/gh-act
, auth is done properly without explicitly passing the token now
Didn't work for me 😢
gh act \
--github-instance "github.mpi-internal.com" \
-s GITHUB_TOKEN="$(gh auth token)"
resulted in
[build/publish_image] ☁ git clone 'https://github.xxx.com/actions/setup-python' # ref=v4
[build/publish_image] Cleaning up container for job publish_image
[build/publish_image] 🏁 Job succeeded
Error: authentication required
I'm getting the same error with v0.2.31 and new ghp_ GITHUB_TOKEN
Same error here !
Same here with v0.2.60:
gh act -j install_in_docker -s GITHUB_TOKEN="$(gh auth token)"
name: TEST!!
on:
workflow_dispatch
jobs:
install_in_docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
Resulted in
[TEST!!/install_in_docker] 🚀 Start image=catthehacker/ubuntu:act-latest
time="2024-04-09T15:25:43+02:00" level=info msg="Parallel tasks (0) below minimum, setting to 1"
[TEST!!/install_in_docker] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
time="2024-04-09T15:25:44+02:00" level=info msg="Parallel tasks (0) below minimum, setting to 1"
[TEST!!/install_in_docker] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[TEST!!/install_in_docker] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[TEST!!/install_in_docker] ☁ git clone 'https://github.com/shivammathur/setup-php' # ref=v2
[TEST!!/install_in_docker] Unable to clone https://github.com/shivammathur/setup-php refs/heads/v2: authentication required
[TEST!!/install_in_docker] Cleaning up container for job install_in_docker
[TEST!!/install_in_docker] 🏁 Job succeeded
Error: authentication required
Okay!! While writing this I found that the problem is the -s GITHUB_TOKEN="$(gh auth token)"
, I ran the same command without setting the token and worked (gh act -j install_in_docker
)
Okay!! While writing this I found that the problem is the
-s GITHUB_TOKEN="$(gh auth token)"
, I ran the same command without setting the token and worked (gh act -j install_in_docker
)
Well that's weird... I ran into the same issue and reran my command without the -s
flag and now back to working
I can't get it work... neither with gh act
nor with act
and -s GITHUB_TOKEN="$(gh auth token)"
.
it's only working, when I put the token manually with -s GITHUB_TOKEN=mytoken
.
Why would it even need the token? The repository is public anyway. I had a type and wrote action/checkout
instead of actions/checkout
.
Bug report info
Command used with act
Describe issue
I just updated my local act version with the latest version.
When I run the act cli with a clean state, I keep getting authentication required.
I tried all the version until v0.2.21 and it started to work again. curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash -s v0.2.21
P.S. I'm running act inside a container inside vscode devcontainer with a mounted docker.sock on my host.
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response