Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do svn commit as different user?

Tags:

svn

I did checkout of my codebase via

'svn co svn+ssh://[email protected]/var/lib/svne2/edumate2/trunk/ trunk/'

I wrote little web application to do merge and check in into the code base that works nicely. Now I want to make this application available for developers. Right now all commits are made under my name.

How can I do commit under different svn user?

I tried svn --username kon ci -m 'EDU-8319 into trunk' /srv/www/htdocs/merging/trunk and the commit went successfully but under my name. svn didn't display any error nor asked for kon's password.

like image 539
Radek Avatar asked Aug 31 '12 00:08

Radek


People also ask

How do I change my TortoiseSVN author?

a TortoiseSVN question. the author name you want to change, select them all and right click for "edit author".

How do I commit changes in svn?

Select any file and/or folders you want to commit, then TortoiseSVN → Commit.... The commit dialog will show you every changed file, including added, deleted and unversioned files. If you don't want a changed file to be committed, just uncheck that file.

How do I commit a directory in svn?

Right-click in an empty area of the folder and select Refresh. You'll see “+” icons on the folders/files, now. Right-click an empty area in the folder once again and select SVN Commit. Add a message regarding what you are committing and click OK.


2 Answers

Another option is to add a config file to your ~/.ssh directory so svn+ssh always uses this user:

Host svn.server.hostname
  User svn.username

For more info check: http://www.highlevelbits.com/2007/04/svn-over-ssh-prompts-for-wrong-username.html

If found this solution via tjstankus @ Subversion ignoring "--password" and "--username" options

like image 45
jvwilge Avatar answered Oct 07 '22 20:10

jvwilge


You're using svn+ssh, so svn will ignore the --username parameter (since the SVN server will just use your login username).

Try svn relocate svn+ssh://<new-user>@repository.server.com/var/lib/svne2/edumate2/trunk/, then committing.

like image 149
nneonneo Avatar answered Oct 07 '22 19:10

nneonneo