You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Internal git pull/push operations are not always authenticated #2944
bugSomething isn't workingcoreThis issue is not accepting PRs from outside contributorspriority-2Affects more than a few users but doesn't prevent core functions
The HTTPS credential behavior introduced in #2449 is only effective after the user has completed the interactive gh auth login flow. However, if someone does this in a script:
GH_TOKEN="..." gh repo clone <repo>
The internal git clone operation is not guaranteed to use the supplied token. Instead, the usual git credential mechanism is used, so if this was run in an isolated environment such as a CI job, the clone command would most likely fail on prompting for username+password.
Commands that can currently result in a git network operation:
repo clone - git clone
repo fork - git remote add -f
pr create - git remote add -f, git push
We could try to add extra flags to those invocations of git to configure that gh should be used unconditionally as a credential helper. Something like:
bugSomething isn't workingcoreThis issue is not accepting PRs from outside contributorspriority-2Affects more than a few users but doesn't prevent core functions
Activity
ItsHarper commentedon Jan 7, 2022
If you are facing this issue from a GitHub Actions workflow, running
gh auth setup-gitis a good workaround.