I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer
group and have full read/write permissions on the repository directory and associated metadata:
svn co svn+ssh://[email protected]/path/to/repository
Several developers work on the same working copy that is checked out under a shared shell account (root
). Because this repository is being used for configuration revision control in a production environment, this is unavoidable. Giving each developer an individual shell account on the target machine (the one on which the checkout is being done) would be one way to solve this problem because then they could each have their own working copy, but unfortunately this is not acceptable here.
We have various post-commit hooks that send e-mails detailing commits, including the username of the person that committed the change.
The problem is that once a working copy is checked out with a given username using the svn+ssh://
URI scheme, commits and updates seem to also have to be done under that username. This is not viable for two reasons:
1) The person who originally made the checkout may not be the person making a commit now, and we need the post-commit e-mails and other post-commit hooks to know exactly who made the commit, and
2) clearly, a commit requires that the committing user know the password of the account of the person who made the original checkout, the use of RSA keys for non-interactive authentication notwithstanding for reason #1.
Is there a way to do dynamically switch out the username of the remote account that is being used for authentication in this scenario?
I did some research and found this question previously:
Changing the username for a Subversion commit over svn+ssh
Unfortunately, the suggestion in the accepted answer (svn switch
) does not work:
[root@db repo-directory]# svn switch svn+ssh://[email protected]/u/svc/repositories/repo-name
[email protected]'s password:
svn: 'svn+ssh://[email protected]/u/svc/repositories/repo-name' is not the same
repository as 'svn+ssh://[email protected]/u/svc/repositories/repo-name'
Any ideas would be greatly appreciated. Thank you in advance for your consideration!
It works with ssh+svn if you modify your client's config: $HOME/.subversion/config tunnels section:
ssh = $SVN_SSH ssh -l *youruser*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With