2

I'm using Windows XP, TortoiseGit (latest version) and Cygwin. I have git.exe installed and on my path. In TortoiseGit, I can execute pushes against the remote repository without being prompted for a password. I assumed this was because I have defined this in my .git/config file ...

[remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = ssh://git@myrepo/myproject.git puttykeyfile = U:\\.ssh\\mykey.ppk 

However, in Cygwin, when at the root directory of my project (the one where the .git folder is a child), I get prompted for a password ...

$ git push origin qa_release git@myrepo's password: 

Why am I prompted for a password when trying to push from Cygwin but not from TortoiseGit and how can I get Cygwin to behave like TortoiseGit (i.e. not ask me for a password)?

Thanks, - Dave

0

1 Answer 1

2

puttykeyfile is a windows git thing, so you need to have your SSH set up for cygwin too. Git will use your regular SSH settings.

Is the .ppk file a regular SSH public key? If so, add the following to your ~/.ssh/config file, so cygwin git knows where to find it.

 Host myrepo IdentityFile /cygdrive/u/.ssh/mykey.ppk 

You can test this quickly with a ssh myrepo in cygwin.

Sign up to request clarification or add additional context in comments.

2 Comments

A variation of this worked for me. Under "Host," I also added "User myuser" and "Hostname myhost" lines in addition to changing the identity file from the .ppk to the private key file. Thanks, -
Btw, ppk IS NOT SSH public key. It's a putty`s private key.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.