62

TortoiseSVN is not saving my authentication details even when I check the save authentication checkbox, and asking me to enter username and password every time I access it.

How can I fix this?

bahrep
  • 29,961
  • 12
  • 103
  • 150
Ravi
  • 7,939
  • 14
  • 40
  • 43

12 Answers12

81

I had the same issue and I simply deleted this folder:

%APPDATA%\subversion\auth\

Next time I logged in it was created anew and my password was properly saved.

Keith Smiley
  • 61,481
  • 12
  • 97
  • 110
Jocelyn
  • 1,297
  • 12
  • 20
59

If you access your repo over ssh, then you can use the following solution to save your ssh credentials:

The easiest way to do this is to right click in Windows Explorer, select Tortoise > Settings. Then in the Settings window select Network. Then in the SSH client set use the Tortoise SSH client, TortoisePlink, to use your username and password. For example:

[DRIVE LETTER]:\[DIR]\TortoiseSVN\bin\TortoisePlink.exe -l foo -pw bar

source

For instance, mine is

C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe -l *mysvnusername* -pw *mysvnpassword*

I have tried this and TortoiseSVN does not ask you for password for update or commit anymore. It is slightly insecure, since your ssh password is stored in plain text.

jpaugh
  • 6,634
  • 4
  • 38
  • 90
Souvik
  • 1,027
  • 8
  • 13
  • 4
    If tortoise tries to put quotes around the whole thing, remove the quotes. – Jared Beck Feb 03 '12 at 19:20
  • 3
    Although this is way less hassle because you don't have to have an external process running in the background, it's probably worth nothing though that if you use more than one repository regularly with different usernames/passwords, you might have to go the pageant way instead. – Jessica Brown Jun 07 '13 at 20:50
  • 2
    If you do have spaces in the path and you need to use quotes then have them just around the path: "C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe" -l mysvnusername -pw mysvnpassword – tristanbailey Jun 21 '13 at 12:17
  • Thank you! Worked great for 1.8 on Win 7 64 bit – krinker Jun 12 '15 at 16:00
  • It is far more secure to set up an identity file, and authenticate using that instead of a password. – jpaugh Feb 16 '16 at 22:32
  • Works for me. Thanks :) – Pradip Das Mar 18 '16 at 08:29
20

If you're using svn+ssh:// to access your repository, svn isn't involved in authentication at all so it simply can not save the authentication. In that case, you have to use an SSH tool like pageant to store your authentication data.

Stefan
  • 43,293
  • 10
  • 75
  • 117
  • 1
    It's a little burdensome. This link from tortoise's site is a general approach: http://tortoisesvn.net/ssh_howto.html , in particular, if you are using sourceforge, follow this instructions https://sourceforge.net/p/forge/community-docs/TortoiseSVN/ . Basically it involves creating a ssh key with puttygen, uploading the public key to the ssh server and then using pageant to load the private key. Note that you got to have pageant running everytime you use tortoise (you might consider adding it to the windows startup) – Juancentro Aug 21 '13 at 11:59
  • The link to the instructions at SourceForge is dead, and I can't find their replacement using Google. – posfan12 Jan 13 '18 at 02:06
16

Here is what worked for me: in TortoiseSVN > Settings > Saved Data, click the Clear button near Authentication Data.

Tibi
  • 530
  • 6
  • 8
6

Go to Tortoise Settings > Saved Data > Authentication Data
And clear whatever you want.

vmourac
  • 61
  • 1
  • 2
6

Considering TortoiseSVN save the authentication informations in the:

# WindowsXp
"%APPDATA%"\subversion\auth
# or, for Windows7
"%APPDATA%"\Roaming\Subversion\auth

(see Where does TortoiseSVN save password cached files in Windows 7?)

You could check if you have any right issue in those directories (try to create a file in it).
Maybe another process block the access to the right authentication file: try rebooting, and see if the problem persist.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
3

This worked for me on Windows 7. Just remove the following directory and restart TortoiseSVN: C:\Users[user]\AppData\Roaming\Subversion\auth

Lucho
  • 71
  • 4
2

I had exactly the same issue...

Had to add the following to my %APPDATA%\subversion\servers

store-passwords = yes

( i also added store-auth-creds = yes store-plaintext-passwords = yes for good measure)

jpaugh
  • 6,634
  • 4
  • 38
  • 90
1

I've found the easiest/best way to do this is check out the repository using a URL like:

svn+ssh://userid@host.com/path/to/repo

Putting the user name in there makes TortiseSVN/Plink use it in the future automatically. Combined with Pageant, you don't have to worry about anything. And it's not global so you can have different user names for different repositories.

Josh
  • 6,944
  • 8
  • 41
  • 64
0

This is how I used ssh to connect TortoiseSVN to a local Linux Server without logging in:

1. Setup (not sure if this section is necessary)

1.1. Open TortoiseSVN settings (Right click a file, tortoiseSVN > Settings)

1.2. In the settings, select Network

1.3. Under SSH, SSH client, enter: "C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe"

1.4. Click OK.

1.5. Install putty

2. Generate the keys

2.1. Run “C:\Program Files (x86)\PuTTY\puttygen.exe”

2.2. Select ssh-2 rsa

2.3. Click Generate (move the cursor around in the window to generate the key)

2.4. Move the cursor around until it is complete (the completion bar should fill up completely)

2.5. Add a key comment (description or user name)

2.6. Select Save public key

2.7. Save it to a file that you create (example: Documents > ssh > description-public-key)

2.8. Select Save private key

2.9. Save it to a file that you create (example: Documents > ssh > description-private-key)

2.10. Select and copy the key from the window

2.11. Save it to a file that you create (example: Documents > ssh > description-authorized-key.txt)

3. Set up the server side

3.1. Putty to the server and log in as the user

3.2. In the home directory, go to or make .ssh (~/.ssh)

3.3. Open/make authorized_keys (~/.ssh/authorized_keys)

3.4. Copy the text from the putty gen window that was saved in the description-authorized-key.txt

3.5. Paste the text in the authorized_keys file

3.6. Save and exit

3.7. chmod 600 authorized_keys

3.9. Make sure that the subversion server is running (To check: ps -e | grep svnserve, to launch: svnserve -d)

3.8. end the putty session

4. Set up the client side

4.1. Open putty on the client/Windows/TortoiseSVN side

4.2. Go to Connection > SSH > Auth

4.3. In Private key file for authentication, enter the full path to the description-private-key file (example: C:\Users\<user name>\Documents\ssh\description-private-key.ppk)

4.4. Go to Session

4.5. Under Saved Sessions, select Default Settings

4.6. With Default Settings selected, select save

4.7. Firewalls might need to be disabled or given exceptions

4.8. Go to a directory to put an SVN checkout (right click > SVN Checkout...)

4.9. In the URL of repository, use svn+ssh://username@... (example: svn+ssh://jdoe@172.217.0.4/path/to/repo)

References:

http://www.tecmint.com/ssh-passwordless-login-with-putty/

https://kb.wisc.edu/education/page.php?id=45394

https://kb.wisc.edu/education/page.php?id=45394

https://tortoisesvn.net/ssh_howto.html

https://stackoverflow.com/a/2356647/5582694

Community
  • 1
  • 1
Chad
  • 111
  • 1
  • 12
0

If you have applications programmatically accessing Subversion, for instance via SharpSVN or SVNKit, your local authentication cache could be getting modified.

There's a simple fix for this--uncomment the following line in Subversion's local config file

store-auth-creds = no

This file is usually stored within the 'Application Data' directory. (Which is a hidden directory by default--unhide hidden folders in folder options). In XP and depending on your installation, this directory is usually at

C:\Documents and Settings\username\Application Data\Subversion

If this config file is not available in your version of TortoiseSVN you have to configure the same setting in the 'servers' file (within the same directory) as a group-based authentication setting. Portions of the config file have been deprecated since my build. My group is using TortoiseSVN 1.6.0, Build 15855.

Dendrite
  • 33
  • 6
0

This is how I resolved the issue in my laptop. Open %APPDATA%\Roaming\subversion\servers file in notepad Towards the end of the file there is a section that had the following: store-password = no I changed it to yes.