4

I run TortoiseGit and it has run well for months. but no matter what I cannot make it remember my passphrase.

I installed it using msysgit ssh instead of TortoiseGit(as I once had some putty problems, so no putty involved!)

I run TortoiseGit 1.8.4.0 and msysgit 1.8.3

I have done the following and it works well but only affects git bash, not TortoiseGit that I like to use. github: No supported authentication methods available

I have tried to add the _netrc as described here (last answer) TortoiseGit save user authentication / credentials But when I place the _netrc file (and set it up with setx) in C:\Users\ricka_000.ssh i only get:

Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

If I put it in C:\Users\ricka_000\ (and change setx home) it seems to be ignored completely and instead I get prompted with the default passphrase prompt.

If I instead put it in c:/Users/ and link it with setx i get this prompt: http://db.tt/BymTUI5C and if I click ok i get:

Could not create directory '/c/Users//.ssh'.
Failed to add the host to the list of known hosts (/c/Users/.ssh/known_hosts).
Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

Thats the _netrc approach. I have also read about wincred but I have tried all sorts of values in TortoiseGit > Settings > Credentials and absolutely nothing happens so not sure how to get that working at all. The username there is that the github/assembla username or is it my email from this line

 ssh-keygen -t rsa -C "me@email.com" 

that I used to generate my keys? What is supposed to happen when filled in? Whats the difference between Local, global and system?

Having to enter my password all the time is driving me nuts so any help would be appreciated!

Community
  • 1
  • 1
Rickard Liljeberg
  • 966
  • 1
  • 12
  • 39
  • Do you have [pageant](http://support.tigertech.net/tortoise-svn#add-the-private-key-jmp) running? That should do this job for you (it does work for TortoiseGit even though those docs are for TortoiseSVN). – adrianbanks Jul 24 '13 at 22:53
  • That does not work. I do not have a ppk file as I don't use putty. – Rickard Liljeberg Jul 25 '13 at 07:20

1 Answers1

2

As I illustrate in "Git - How to use .netrc file on windows to save user and password", _netrc is for remembering the login/password expected for https url.

You can play with _netrc all day long, if you have ssh keys for ssh urls, this won't help one bit.

In both cases (ssh keys or netrc login), make sure %HOME% points to your %USERPROFILE%.

Then, for ssh url, you can try and add a ~/.ssh/config file, and add an ssh-agent to avoid entering a passphrase (if you did put one when generating your private key). Other tips here.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank for you for explaining _netrc being for http. I have set HOME variable with setx. I added a config file altho unsure of whats supposed to be in it. I then tried the add ssh agent and get quite confused. Needless to say I cannot get that working (nor does the config file change anything). Would it be possible with a step by step instruction there? – Rickard Liljeberg Aug 18 '13 at 10:44
  • @RickardLiljeberg try first with https url (no need for ssh keys, and the `_netrc` actually comes in handy). But if you must use ssh urls, *at least* generate a private ssh key *without* passphrase to begin with: no need for a ssh-agent. – VonC Aug 18 '13 at 10:46
  • Yeah, not a nice solution with blank passphrase but i guess i am prepered to go there now. – Rickard Liljeberg Aug 18 '13 at 10:51
  • @RickardLiljeberg at least, that let you check that ssh url does work (that your public ssh key is published correctly published). Then you can try to generate one with a passphrase. – VonC Aug 18 '13 at 11:07
  • I tried without passphrase now and everything works. Everything did work with passphrase before I just had to always enter it. I don't think I will bother anymore but rather stay with this solution. Thank you for the help. You will get the bounty in an hour when i can give it out. – Rickard Liljeberg Aug 18 '13 at 11:32
  • @RickardLiljeberg ok. For private key with ssh passphrase, putty is generally involved (http://stackoverflow.com/a/4356869/6309, http://blog.shvetsov.com/2010/03/making-pageant-automatically-load-keys.html), but you said "no putty" in your question. – VonC Aug 18 '13 at 11:39