Amr Eladawy
Amr Eladawy

Reputation: 4358

How to use svn+ssh in IntelliJ Windows?

Our SVN server allows ssh connections only. How can I configure IntelliJ on Windows to connect to SVN server using svn+ssh?

Upvotes: 3

Views: 5456

Answers (1)

Amr Eladawy
Amr Eladawy

Reputation: 4358

In order to connect to SVN using ssh on a Windows machine, you will need to

  1. Generate your ssh private key and upload it to your user allowed keys on the server.
  2. Create a saved PuTTy session to use the private key file.
  3. Download TortoiseSVN Plink to be used as SSH tunnel.
  4. Configure IntelliJ to use TortoiseSVN to connect to your SVN server.

Here are the details of these steps.

1. Generate your private key.

You can use PUTTYGEN to generate the private key.

Generate the private key

Then save the key in the .ssh folder in the user home directory.

save the key

If you have Windows 10, you can use Bash on Ubuntu on Windows to generate and load your private keys.

ssh-keygen -t rsa

This will generate the file ~/.ssh/id_rsa

Then load the key to the server

ssh-copy-id  [email protected]

The final step is to move the generated file from the Ubuntu subsystem path to your home directory in windows.

cp ~/.ssh/id_rsa  /mnt/c/Users/amr/.ssh/

You still need to convert the key from OpenSSH to PPK format using the PUTTYGEN tool. From the tool load the file and then save the private key again in the PPK format.

2. Create a saved PuTTy session and configure it to use your private key.

Create a new session in PuTTY for login into the SVN server and change the setting of SSH/Auth to point to the private key file

enter image description here

3. Use Tortoise SVN Plink as the ssh tunnel

Download and install Tortoise SVN. It has a command line tool named TortoisePlink which is based on puTTY. We will use plink as the SSH tunnel for SVN.

4. Configure IntelliJ to use this SSH tunnel for Subversion.

Go to File/Settings/Version Control/Subversion then select SSH settings tab.
Select Subversion config

intellij

make sure SSH tunnel is set to $SVN_SSH ssh -q then add the path to TortoisPlink as in the picture. Make sure to skip backslashes.

Then, you are good to go.

Upvotes: 5

Related Questions