-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-authrelating to the gh auth commandrelating to the gh auth commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
gh auth setup-git should be used to configure the github credential helper (basically git config --global credential.https://github.com.helper !'$PATH_TO_GH.EXE' auth git-credential however the command fails with You are not logged into any GitHub hosts. Run gh auth login to authenticate.
as the command is purely configuring git there should be no requirement for it to be logged in. this causes pain where the command is being run to pre-setup developer environments but leaves the login to the user at a later date (when it is needed)
gh version 2.40.1 (2023-12-13)
https://github.com/cli/cli/releases/tag/v2.40.1
Steps to reproduce the behavior
- on a clean machine download and install but do not configure
gitandgh gh auth setup-git --hostname github.comgit config --global -l
Expected vs actual behavior
the command in step 2 runs without error
the command in step 3 shows that the helper has been added
Actual behaviour is the second command fails
> gh auth setup-git --hostname github.com
You are not logged into any GitHub hosts. Run gh auth login to authenticate.Logs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-authrelating to the gh auth commandrelating to the gh auth commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic