Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prompted for password on git pull origin [branch]

When I attempt to git pull origin [branch] in order to pull in changes to the repo, I am prompted for a password. My system password and just hitting enter return: "fatal: Authentication failed".

The thing is, I never entered a password for this project in the past and this was not the case when I began it last week, nor any of the times I pushed and pulled since then. Speaking to my client, they thought it was something with my SSH keys.

I double checked the keys and made sure they were correct, running ssh [email protected]. I'm getting:

Hi bdkay! You've successfully authenticated, but GitHub does not provide shell access. Connection to github.com closed.

which makes me think it succeeded. However, right before that a troublesome line reading: "PTY allocation request failed on channel 0" occurs. The client says I'm still added to the repo in github and they have not changed anything on their end. I'm still working on the same machine but cannot seem to find a fix through google or searching this site. Any help is greatly appreciated.

like image 480
Brendon Avatar asked Sep 27 '11 19:09

Brendon


People also ask

Why is Git pull asking for password?

If Git prompts you for a username and password every time you try to interact with GitHub, you're probably using the HTTPS clone URL for your repository. Using an HTTPS remote URL has some advantages compared with using SSH. It's easier to set up than SSH, and usually works through strict firewalls and proxies.

How do I remove login pop verification for credentials GitHub?

If you don't want to the manager helper, run git config -l --show-origin to find the file which has the other credential. helper setting and then edit it to remove that option.


1 Answers

If you're being prompted for a password, and not your SSH key's passphrase, then you're not using the SSH URL. HTTPS asks for user/pass auth, SSH uses key/passphrase. Check your remote's URL with git remote -v, and if you need to fix it use git remote set-url.

like image 130
Tekkub Avatar answered Nov 11 '22 23:11

Tekkub