4

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

4
  • Is the place you're cloning from also on a Windows server?
    – nickgrim
    Mar 9, 2011 at 21:41
  • no, it's on a linux server.
    – Sandy
    Mar 11, 2011 at 17:12
  • 1
    There is no DOS subsystem anymore. You want to do this from the command prompt.
    – MDMarra
    Sep 26, 2012 at 12:04
  • can you do a password-less ssh comand on the server? and is the remote machine password or the ssh key password that u get asked?
    – Aragorn
    Nov 28, 2012 at 21:10

1 Answer 1

1

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.
2
  • 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, 2011 at 23:17
  • The third line is kind of the whole point of it. Nickgrim's instructions will have git using putty with pageant to handle its SSH connections, which can use the private key. May 24, 2013 at 9:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .