Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to change the default svn username and password to commit the changes?

    • 0
    • 0
    • 0
    • 0
    • 2
    • 0
    • 0
    • 0
    • 12.6k
    Comment on it

    Sometimes your SVN is configured with your own svn-account, but some changes in your code are to be commited from some other person's svn account.

    This commit could either be a one time operation or permanently the svn account might need to be changed.

    If this is a one time operation, i.e the code is to be commited with other person's svn account for only 1 time then we can use the --username and --password switches provided by svn.

    For ex:
     If i want to commit the code from another person's svn account having username as 'newUser@abc.com' and having password as '123456'.

     I can commit the code to svn as

    $svn commit --username newUser@abc.com --password 123456

     

    If you want to change the svn credentials permanently. i.e from now onwards if you want the code to be commited using 'newUser@abc.com' svn-account everytime, so instead of using the --username and --password switch everytime, we can just remove the old svn account and configure the new svn account as the default account for any svn changes from now onwards.
     

    For this, we need to remove the previously saved svn credentials from your system.

    By default the svn credentails are stored in a hidden directory named as 'subversion/auth' in your home folder. If you open up the svn.simple directory inside 'auth' you will see a file inside it which contains the current svn username and password that is configured on your system. We need to remove it.

    You can remove the entire 'auth' directory for this, using the following command in your terminal

    $rm -rf ~/.subversion/auth

     

     After this the old credentials will be removed from your system. and when you take svn update for the next time using

    $svn up

    It will prompt you for the new svn username and password. And those would be automatically saved in your system in the files mentioned above. And from now onwards it will act as the default svn username & password.

    ex:-
     Write system password ============> 123456
    new username =========> newUser@abc.com
    new password =========> 123456

 2 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: