Bug report info
I don't think it's relevant and it's stuck on my work computer. I can provide if necessary.
Command used with act
Describe issue
With gh installed and authenticated to a GHE instance with a custom host, act pulls the token without checking if it is for the correct host. This results in sudden 401s and left me quite stumped. Doing a gh auth logout or a gh auth login -h github.com fixes the issue by either omitting the token (allowing public pull to succeed instead of sending a bad token to the wrong host) or returning the github.com token as the default, respectively. However, a code fix could be implemented, I believe at
|
cmd := exec.CommandContext(ctx, path, "auth", "token") |
to retrieve only the token for the correct host.
Link to GitHub repository
No response
Workflow content
name: Example
on:
workflow_dispatch:
jobs:
action:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
Relevant log output
git clone 'https://github.com/actions/setup-node' # ref=v4
authentication required: Invalid username or token. Password authentication is not supported for Git operations.
Additional information
No response
Bug report info
Command used with act
Describe issue
With
ghinstalled and authenticated to a GHE instance with a custom host,actpulls the token without checking if it is for the correct host. This results in sudden 401s and left me quite stumped. Doing agh auth logoutor agh auth login -h github.comfixes the issue by either omitting the token (allowing public pull to succeed instead of sending a bad token to the wrong host) or returning the github.com token as the default, respectively. However, a code fix could be implemented, I believe atact/pkg/gh/gh.go
Line 20 in bd86152
Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response