问题
I have source code checked out on my Linux machine. I connect to it via Samba. On a Linux machine, the SVNROOT
is set to <mylogin>@<serverhost>. In additon, SVN_SSH
is set to point to my private key that the system administrator generated for me. On Linux, I am NEVER prompted for the password. The system administrator claims that the private key takes care of it.
On the same directory that I access through Samba, I run TortoiseSVN. However, it constantly prompts me to enter a password for <mylogin>. My system administrator says that I have no password, just the private key.
What do I do with TortoiseSVN so that it does not prompt me for the password?
回答1:
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.
回答2:
Tortoise SVN right click on desktop -> Tortoise SVN-> settings -> saved data -> authentication data (button press 'clear') ! try logging in now again !
回答3:
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.
回答4:
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.
回答5:
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.
回答6:
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!
回答7:
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
回答8:
If your path to repo is like svn+ssh://server@hostname/path/...
and you have password to access it, you can solve it in network settings like this:
Settings -> Network -> SSH client
C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe" -pw [password]

来源:https://stackoverflow.com/questions/6225916/tortoisesvn-keeps-on-asking-me-for-my-password