-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
git asks for password despite authentication with gh #4351
Comments
In case it matters, when I do re-authorize with |
If you said "Yes" to that prompt, then I think git authentication should have been set up for you. But from what you're telling, it sounds like that's not the case. Can you share with us the output of:
Also please check that you don't have an old password for GitHub stored in your |
After running
And then doing a git pull, things seem to be working as expected.
|
Sure, that looks okay, but if you've chosen "yes" to |
I had the same issue and on deleting the credentials section in the git config and re-authenticating solved the issue.
|
I experienced the same problem, but I believe in my it was due to the fact that I used the |
Using Snap is wholly unsupported by us and we recommend strongly against it (for reasons like this). |
I was the same issue, using the gh tool to configure my git worked for me. Here's what I did after I had
|
I faced the same issue. I had installed gh with snap. I removed it, and installed with sudo apt get, then it started working |
I also have this problem, and I think this issue isn't solved yet, because as @mislav said:
gh is not configuring it properly. From what I understand the only way to fix this is to add it manually to git config. |
@ZachHandley, I don't think this has to do with the issue. I might be wrong, but I'm pretty sure gh doesn't configure your git username and email for you. Not being able to commit doesn't have to do with credentials. Credentials are only when you try to communicate with the github server: push (for public repositories) and also fetch and pull (for private repositories). The reason you are getting this error doesn't have to do with credentials, it has to do with that git stores a name and email for every commit.
|
This may have happened to me because i setup my computer with a pre-written script and the times of installation of git and gh may differ But once i setup again using |
This might help:
Search for more info: https://www.google.com/search?q=git+config+credential.helper |
Hello All, Even I faced same issue Solution: in the place of username : in my case TheNandan |
I also encountered this using the snap version of 'gh' on Ubuntu. Uninstalling and using Github official install instructions and re-authing worked. |
Same for me. Had to run "snap remove gh" and then use the GH instructions here: I had to logout and restart the terminal and then I could run gh auth login. After that the push to the repo worked without issue. |
By the way, if you guys want to look at the automated scripts I wrote, please refer to github.com/m3rashid/pc_setup |
in my case, the error was: /usr/bin/gh auth git-credential get: 1: /usr/bin/gh: not found solution: then install using apt then login again then try pushing again, should work. |
Describe the bug
Any git command that needs credentials asks for my password, despite being logged in with
gh auth login
. If I re-authenticate,git
wont ask for my password for a few minutes, but will eventually revert to asking for my password again.gh version 2.0.0
CentOS Linux release 7.5.1804 (Core)
git version 2.30.1
Steps to reproduce the behavior
git pull origin master
gh auth status
Expected vs actual behavior
I expect
gh
to supply my credentials when performing git operations. After authorization, it works as expected for a few minutes. Instead after a few minutes git asks for my credentialsI apologize if this issue has been reported before, or if I'm doing something stupid. Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: