Sunday, May 13, 2012

SVN+SSH Access without password

Amazon EC2 instances allows SSH login without password. If you setup SVN server on Amazon EC2 instance,  you can easily use SVN+SSH access your source code server without password as well. The following is guideline.

Assume svn repository was created as normal:

$sudo svnadmin create /var/lib/svnroot
$sudo chown -R ubuntu /var/lib/svnroot
$sudo chmod -R g+rws svnroot

Then at client side:
$export SVN_EDITOR=vi
$export SVN_SSH="ssh -i /path/to/your.pem -l ubuntu"
$svn import myproject svn+ssh://ec2instancename.compute-1.amazonaws.com/var/lib/svnroot/myproject

No comments:

Post a Comment