Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

ssh

commit

svn

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?

like image 267
lost baby Avatar asked Nov 21 '11 16:11

lost baby


2 Answers

  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.

like image 179
Míla Mrvík Avatar answered Dec 14 '22 23:12

Míla Mrvík


Use --username option

svn commit --username johnd
like image 20
ks1322 Avatar answered Dec 15 '22 01:12

ks1322