Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

new computer, git pull origin is asking for a password

Tags:

git

windows

on my new computer, I setup git and my putty.exe and ssh key etc. just fine.

So I do a:

git pull origin

and then at the command prompt, I am asking for a password.

I have no idea what password it wants, and then it also asks for my server's password after a few failed attempts at the first password.

it asks for:

[email protected] password:

What is going on?

(my git rep is hosted on a shared unix isp)

I already setup pageant to use my private key, and it gave me a popup to enter my passphrase. This is how it works on my old computer, and then when I open git-bash and do a 'git pull origin' it works fine without asking me anything.

Update II

So let me summarize what is happending here:

I have the exact same setup at my office computer (windows7) (desktop), and it works fine w/o asking me any questions. All I do b4 using git is run a .bat file that loads up pageant.exe:

C:\putty\pageant.exe "E:\code\pg_pk.ppk"

Then doing a git pull origin works fine, doesn't ask me for any password.

I had this on my laptop also, and it worked just like my office computer UNTIL I installed windows 7 on it. Now it asks me for a password even though pageant.exe is running (I can see it in my taskbar, and the key is loaded).

So today I grabbed the .bat file and the entire /putty folder and put it on my laptop, still doesn't work, it is asking me for a password when I type: git pull origin

(I am running the same version of git on both computers)

Really confused, what could it be?

like image 796
Blankman Avatar asked Feb 23 '10 03:02

Blankman


2 Answers

It isn't clear from your question whether or not you set up Git to actually use PuTTY. What is the content of your GIT_SSH environment variable?

It should be set to the full path to plink.exe. Even better yet: if you also use TortoiseSVN or TortoiseHg, set GIT_SSH to their TortoisePlink.exe. TortoisePlink has been modified to not read from the standard input, but instead pop up a dialog window, if something goes wrong. Git redirects standard input, so that you cannot actually type anything into plink, if, for example, your server's IP address changes and plink asks you to type yes to confirm it, that won't work. (You'll have to invoke plink or putty manually, then say yes and they will save it in the registry.) TortoisePlink will instead pop up a Yes/No dialog box.

like image 165
Jörg W Mittag Avatar answered Nov 07 '22 11:11

Jörg W Mittag


You ssh key passphrase.

To remedy, you can recreate a key on your new machine using ssh-keygen and then save in the git origin

like image 45
Andrew Kolesnikov Avatar answered Nov 07 '22 12:11

Andrew Kolesnikov