4

I have a set up script that has parts that require root. Part of the setup is a svn+ssh checkout (which does not need root but is still run as root). I have a special user for ssh and I set up the keys such that if run as that user no password is needed and the automation works. However, since its run with sudo as a different user, svn+ssh looks in the wrong location for the key.

I know ssh has -i which allows me to specify the key file to use. Is there a way to sell svn+ssh to do that?

2 Answers 2

5

You can use arbitrary programs instead of ssh. Simply add the following to your config file (~/.subversion/config):

[tunnels]
ssh-otheruser = ssh -i /home/otheruser/.ssh/id_rsa

Then, you can checkout with

svn co svn+ssh-otheruser://...
Sign up to request clarification or add additional context in comments.

Comments

0

This one should work

SVN_SSH="ssh -i /home/otheruser/.ssh/id_rsa" svn co svn+ssh://otheruser@your_svn_url

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.