Search code examples
svnsshcommit

How to commit to svn when remote username differs from local?


I am developing on a mac and using an svn server on another machine using svn_ssh.
While I was able to do an initial check-in and check-out, I cannot do a commit from the command line because the system tries to use my local username jondoe (and prompts a password) when connecting to the remote server where my username is johnd.

So, how can I tell the svn+ssh to use johnd for my commits?


Solution

    1. Backup your changes (just changed files, you mustn't overwrite .svn directory)
    2. Checkout again, but now using your remote username

      svn checkout svn+ssh://<ssh_username>@<svn host domain>/<server repository path>
      
    3. Restore your changes from backup

    4. Commit them

      svn commit -m 'Description'
      

    I've just successfuly checked out and committed with different local and SSH usernames.