tags:

views:

376

answers:

4

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?

A: 

I'd double-check your SSH keys--looks like it's not properly sending your identity.

Kyle Slattery
+2  A: 

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

Andrew Kolesnikov
I already set that when I clicked on my .bat file that starts pageant, hmm...very strange!
Blankman
A: 

I have found that pageant sometimes just does not work. IMHO it is far easier to set it up using a blank password key with command line ssh client. From memory:

  1. Generate public/private key using git bash:

    ssh-keygen -t RSA -C email@address

DO NOT specify password.

  1. Upload the the contents of %USERPROFILE%.ssh\id_rsa.pub

  2. Git should just work, including windows command line, git bash, tortoise, git extensions etc.

Igor Zevaka
+1  A: 

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.

Jörg W Mittag
I have a .bat file that I click on b4 using Git-Bash, it has: c:\putty\pageant.exe "e:\code\pg_pk.ppk"
Blankman
and this works on my office computer, and worked on my laptop, but now when I installed windows7 on my laptop, its not working? (my office computer is w7)
Blankman
@Blankman: This *still* doesn't answer the question whether you set up Git to actually *use* PuTTY. If you set up Git to use OpenSSH, you can start Pageant all you want, OpenSSH doesn't give a rat's ass about Pageant. So, I repeat: what is the content of your `GIT_SSH` environment variable?
Jörg W Mittag
Jorg, I don't recall every having to set the GIT_SSH, but I might have forgotten? How do I set the environmental var ? Should I just point it to plink.exe or do I need to point it to my key also?
Blankman
thanks that worked.
Blankman
blankman, what did you change?
Michael