views:

1788

answers:

6

I want AnkhSVN to remember my SVN + SSH password. Until now I have to type it multiple times per operation. A previous topic discussed 2 solutions

1) Replace the default ssh client by renaming plinkw.exe to ssh.exe and moving it to one of the folders AnkhSVN searches for SSH client.

2) Replace the default ssh client in the configuration files/windows registry.

I couldn't use solution 1, because I don't know where to get plinkw.exe, and my PuTTY's plink.exe requires that the password be passes as an argument.

I couldn't use solution 2, because I couldn't find the configuration files nor the windows registry's keys.

Can you help me?

PS: I also posted this in the AnkhSVN forum: http://ankhsvn.open.collab.net/ds/viewMessage.do?dsForumId=582&dsMessageId=323292

+2  A: 

Someone can help me out here, from memory you have to create a special key at the host SSH server and then copy the public key to your local system. Putty can then use this public key to negotiate your credentials without you having to type them in over and over again. That said it's a massive security hole on a windows system as anyone who has that key has access to your *nix system.

Spence
I configured Putty's Default Settings to use certain PPK file and it worked
Jader Dias
Drive by downvote for some reason??? Anyone care to comment why?
Spence
+2  A: 

AnkhSvn uses a custom build of plink.exe, related to PuTTY. It was modified to show password and certificate validation in a dialog box instead of in the console window.

The best way to achieve this would be to connect using an SSH keypair, instead of username password. You'll probably need to edit the Subversion configuration to set up the specific key for a server/repository. That way you can also test with svn.exe if the setup is what you want, which probably gives you more detailed feedback. See also an earlier post on the AnkhSvn mailing list about the topic.

If you use a keyphrase on your private key (what I'd recommend), you can use Pageant to remember the keyphrase.

Sander Rijken
A: 

I have the same problem on windows 7. I can ssh to our svn server using a keypair - with the key loaded in pagent, I am connected imeediately, no password prompt. Tortoise works similarly well. Ankh however, does not seem to recognize the key. If I change the connection parameters for the host in the putty setup (ie: change hostname/ip), I can see the change reflected in the ankh host password prompt, but it still prompts me! How to fix this?

John
In my experience if you configure Putty to use a private key, both TortoiseSVN and AnkhSVN will use the same key automagically. But it was Windows XP.
Jader Dias
Yep, that was my experience too, which is why I'm surprised and handily puzzled at this behaviour. One picks it up, the other doesn't, even though they're reading the same putty connection profile data.
John
See also Johns followup answer: Visual Studio was running as a different users. (And newer SharpSvn/AnkhSVN versions allow storing the credentials in the Windows keystore. Using pageant is a safer solution though, as it makes it not just hard, but completely impossible to recover password that way)
Bert Huijben
+2  A: 

Aha! Fixed my problem!

I had set Visual Studio to "Run as Administrator" but my pageant.exe, called via a link in the Startup folder, was not... it was still running as the logged on user. Once I reconfigured pageant to "Run as Administrator", the password prompting went away!

Edit: TortoiseSVN starting bugging me for passwords after I did this. :( So, I've now got TWO instances of pageant running - one as admin (for visual studio/ankhsvn, the other as my logged on user for tortoisesvn). Silly, I know, but it's working till something better comes along.

John
+1  A: 

I just downloaded AnkhSVN v2.1.7756 and I immediately ran into this issue. It looked like it was remembering the password (it was filling in the password box and I just had to click ok) but it was seemingly ignoring the remember this option and always forced me to click ok each time. I ended up just downloading SharpSVN (SVN API for C# that is included in AnkhSVN) v1.6009.1478 which was a little newer than than the one included. I just copied the SharpPlink-Win32.svnExe file from the newer SharpSVN and overwrote the one in the AnkhSVN directory and this solved the problem for me. Might be a little easier than setting up putty with a keypair especially if you don't use any other SVN clients (I don't use TortoiseSVN).

Jason
Yes, newer SharpSVN versions (or actually SharpPlink) store the ssh password in the windows keystore if the user checks the save password box. Current AnkhSVN versions have this newer version
Bert Huijben
A: 

Hey I'm having the same issue as John but I can't start two instances of pageant it will not allow it. Please help.

See Jasons answer. Newer AnkhSVN versions have a plink version that allows saving your password. If you need two pageants, one has to be started as administrator(Right click->run as) or the trick of two pageants won't work.
Bert Huijben