-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues setting up git authentication with github CLI #174
Comments
Hi @JaneJeon, I am sorry we missed this earlier. I stumbled upon this issue when investigating a different one. You are right in that the path should be |
Thank you. For the moment, I've simply resorted to using an SSH key for authentication and signing w/ github. |
Hey @JaneJeon, I've just stumbled across this cool git (+docker) 1Password credential helper project which makes it possible to use 1Password as a secret store for your git (or docker) credentials. I haven't tried it myself yet, but it seems as an interesting starting place for you if you want to switch over to using https for git auth alongside storing your credentials in 1Password. Alternatively, if you want to stick to SSH, take a look the 1P support for SSH |
Thanks, but as I've said above, I've currently resorted to using 1P + GH over SSH, and I'd much rather have proper gh/git authentication support baked with 1p CLI. |
|
+1 to @ascarter's suggestions, both about fixing the |
Platform or tool
GitHub
Desired or expected behavior
I authenticated my github CLI via
op
's GitHub plugin, using the Personal Access Token stored in my vault. It works fine when I callgh
manually; however, when I try to authenticate git usinggh
(I wanted to use Personal Access Token for authenticating git, as I was trying to push a commit with a github workflow change), it failed (see below).This was even after I ran
gh auth setup-git
, which I understand is a way forgit
to authenticate directly usinggh
CLI (which is now authenticated by theop
plugin) without having to resort togit-credentials-manager
.When I inspected git settings, turns out the issue was that git was trying to use credential helper of
!/opt/homebrew/bin/gh auth git-credential
(default behaviour of runninggit auth setup-git
), which was usinggh
without the aliasing that theop
plugin sourcing does!So I ended up having to manually set the credential helper as
gh auth git-credential
, but it doesn't really sit right with me.git
andgh
?Thanks.
Current behavior
Relevant log output
No response
op CLI version
2.13.1
The text was updated successfully, but these errors were encountered: