I would like to use the DOS command line to enter the command: git clone "git_path.git" myDir It asks me to enter a password which I would like to avoid. I usually use TortoiseGit to do all git related operations. I would like to setup cruisecontrol using ant with a custom git task. Therefore I need to perform git clone on the command line in Windows 7. But it only works using git bash and not DOS.

According to other forum entries, I tried to convert the key with puttyGen and put the file id_rsa in c:/Users/myName/.ssh I also added an authorized_keys file but it still asks for a password. Any ideas?

Thanks

link|improve this question
Is the place you're cloning from also on a Windows server? – nickgrim Mar 9 '11 at 21:41
no, it's on a linux server. – Sandy Mar 11 '11 at 17:12
feedback

1 Answer

I'd guess that the problem is that git bash knows to look for a public-key in your home directory, but the DOS box doesn't.

There are, I think, a few options available to you (none of which I've tried, since I don't have a Windows box to hand):

  • Make sure that you're running pageant (I assume you're not, since you didn't say you were) and that you've got that private key loaded.
  • Set up a connection in PuTTY named after your remote-server and specifying the private-key in the settings.
  • Set the GIT_SSH environment-variable to something that specifies the location of the private-key - I'd guess the contents should probably be something like plink -i c:/Users/myName/.ssh.
link|improve this answer
Thanks, but it still doesn't work. I installed pageant, opened Putty, entered the remote address and added the private key to the session. But it still wants a username and password to login. Isn't the private key enough? I didn't really get what you meant with point 3: how does that work with plink? Thanks! – Sandy Mar 14 '11 at 23:17
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.