TortoiseSVN keeps on asking me for my password

左心房为你撑大大i 提交于 2019-11-30 11:08:23
Turbo J

TortoiseSVN has a good chapter regarding SVN and SSH in its "help" documentation. The basic point is that you use PuTTY to connect.

So you need to configure PuTTY correctly first.

Tortoise SVN right click on desktop -> Tortoise SVN-> settings -> saved data -> authentication data (button press 'clear') ! try logging in now again !

By selecting "Settings" from the TortoiseSVN menu, and clicking the "Network" section, you can configure the "SSH client" command line. Adding " -i " followed by the path to your private key there will make the authentication work as it does on Linux.

The default SSH client is a program called "TortoisePlink", which uses a different key file format than the OpenSSH client that's used on Linux. You can convert the key supplied by your sysadmin to that format using the puttygen tool available here http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Alternatively, you could use an OpenSSH client with TortoiseSVN. The ssh.exe that comes with cygwin works fine, for example.

If you don't have a password, but have a key (.ppk):

Download PuTTY and run it. Interesting keys are:

  • Session – Host name and port,
  • Connection – Data – Auto-login username,
  • Connection – SSH – Auth – Private key for authentication.

Now save your configuration — go back to Session and enter e.g. MyServer into Saved sessions text field, then click Save. After that UX nightmare you can re-open PuTTY, double-click on your MyServer in session list and be logged in without providing anything.

TortoiseSVN connection string should look like svn+ssh://MyServer/path/to/repo. Long story short, MyServer string is checked by TortoiseSVN in PuTTY settings.


If you don't have a key, but have a password:

Go to TortoiseSVN – Settings – Network – SSH Client, and set it like that:
"C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe" -l <username> -pw <password>

Your connection string should look as usual: svn+ssh://serverhostname/path/to/repo, without username@.

This is insecure and all, for those who don't give a f-ck and want it now.

Chris Chilvers

If you're using a key to connect via SSH, and that key is password protected, it isn't SVN asking you for your password, it is SSH (or Plink).

SVN will make multiple calls, each establishing its own connection, and SVN doesn't know anything about the password requirement of SSH, thus it cannot cache the password.

You can avoid this by using an SSH key agent. For example, if you're using PuTTY, then use PuTTY's, Pageant.

I'm writing what can be happening since I had a similar situation.

It seems that PuTTY will use a configuration matching the domain of the svn host you are trying to connect to from Tortoise SVN if it exists.

So if your svn host is located at myServer.de and you have a configuration in PuTTY named myServer.de that doesn't match the connection criteria of your SVN server and then you try to access from Tortoise SVN to svn+ssh://myUser@myServer.de/blablabla PuTTY (it is used by default to establish the SSH connection to the server) will use the configuration myServer.de instead of the one supplied by Tortoise SVN.

It happened to me and it was driving me crazy! In my case it was asking for the password since the supplied key in PuTTY's configuration was outdated!!!

I hope it helps.

Regards!

This happen when you connect to svn+ssh using a key (private key) that got a passphrase. In this case Tortoise svn will use ssh (like mine is putty) and it will prompt you for password.

To allow it to not asking you for passphrase you need to use Pageant, after you add key to Pageant, it will keep the phrase and not ask you more...

To know how to add key, read the below:

https://www.digitalocean.com/community/tutorials/how-to-use-pageant-to-streamline-ssh-key-authentication-with-putty

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!