58

I need to commit my changes to repository, but on this laptop (svn configurations) I'm not default user.

How can I set my login and password as default in svn config?

OS_X 10.9 svn, version 1.7.10 (r1485443)

4 Answers 4

99

To use alternate credentials for a single operation, use the --username and --password switches for svn.

To clear previously-saved credentials, delete ~/.subversion/auth. You'll be prompted for credentials the next time they're needed.

These settings are saved in the user's home directory, so if you're using a shared account on "this laptop", be careful - if you allow the client to save your credentials, someone can impersonate you. The first option I provided is the better way to go in this case. At least until you stop using shared accounts on computers, which you shouldn't be doing.

To change credentials you need to do:

  • rm -rf ~/.subversion/auth
  • svn up ( it'll ask you for new username & password )
Sign up to request clarification or add additional context in comments.

4 Comments

I suggest not to use -f (force) on rm if it's not needed. rm -r will do in this case.
If you afraid to remove then just move the folder using mv ~/.subversion/auth ~/.subversion/auth1
This did not work for me. It only asked for password and used the username with which I was logged in in Ubuntu, which is not my svn username. @FlipMcF's answer worked however.
This may only break the link to the password if it's saved in your keyring/wallet, from where it could be recovered.
29

since your local username on your laptop frequently does not match the server's username, you can set this in the ~/.subversion/servers file

Add the server to the [groups] section with a name, then add a section with that name and provide a username.

for example, for a login like [email protected] this is what your config would look like:

[groups]
exampleserver = svn.example.com

[exampleserver]
username = me

2 Comments

alroc's answer is helpful, but this is what i was looking for. thanks!
This is the best answer for global configuration!
7

In TortiseSVN settings

right-click menu >> settings >> Saved data >> Authentication data [Clear]

The side effect is that it clears out all authentication data and you have to re-enter your own username/password.

Comments

3

For Windows (7), the same folder is located at,

%APPDATA%\Subversion\auth

Type in the above in the Run(Win key + R) dialog box and hit Enter,

To check the existing username, open the below file as a text file,

%APPDATA%\Subversion\auth\svn.simple\xxxxxxxxxx

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.