I have to check some code and run it. I have the URL:
svn+ssh://myuser@www.myclient.com/home/svn/project/trunk
I have a file with their private key. What do I do to get this code?
I have to check some code and run it. I have the URL:
svn+ssh://myuser@www.myclient.com/home/svn/project/trunk
I have a file with their private key. What do I do to get this code?
The private key goes on the client machine, often named as
~/.ssh/id_rsa
,~/.ssh/id_dsa
, or~/.ssh/identity
depending on the SSH version and the type of key. However, you can just usessh -i path/to/private.key
.This is presuming that the corresponding public key exists on the server in
~/.ssh/authorized_keys
, and that your local machine is running the OpenSSH client. If you are using PuTTY on Windows, simply open up the Pageant program, and import the key via the GUI.Add this entry to your ~/.ssh/config file:
For more options, see the ssh_config man page.
If you need to use a custom key just for svn, the following will work:
SVN_SSH="ssh -i /path/to/key_name"
export SVN_SSH
svn commands
http://labs.kortina.net/2010/01/30/svn-checkout-with-private-key-over-ssh/
Here are the steps that I used to connect from the Mac OS X command line to my server via svn+ssh:
On server:
Copy contents of mykey.pub to ~/.ssh/authorized_keys (create authorized_keys file if it doesn't exist)
Download mkey to your local machine and run:
checkout from your svn server with ssh:
Delete mkey and mkey.pub from your server
Add the private key to your
~/.ssh/
folder and then runssh-agent $SHELL; ssh-add;
, and then thesvn co
of that URL should work.In addition to the answers two screen shots from Eclipse 3.7 with Subversive.
Enter the user name! (I have forgotten this before taking the screen shot). Do not enter a password.
Enter the key passphrase if you private key is passphrase protected.
A picture is worth a thousand words.