Minggu, 17 Juli 2011

Subclipse "SVN Cannot Create Tunnel" Error

When I check out SVN project in Eclipse via Subclipse plugin it fails and displays an error dialog "SVN: can't create tunnel". How do I fix it?
A few definitions first. Eclipse is a popular IDE for developing software, particularly Java, PHP, and C++. Subclipse is a plugin that can be installed on Eclipse making SVN tools available to the IDE's user. SVN is Subversion which is one of the most popular free source control software applications.

When I installed Subclipse on Eclipse on Windows 7 platform I didn't have trouble checking out and manipulating my SVN project which is hosted somewhere remotely. However when my friend did he saw the following error when trying to check out an SVN project:

Subclipse SVN Cannot Create Tunnel

If you are using SVN command line then the SVN command to check out a project looks like 'svn co svn+ssh://...'

How do I fix this error?

The Issue
When you check out an SVN project two protocols are needed: SSH, SVN. That's they the SVN project URL is prefixed with 'svn+ssh://'. This combination ensures that your communication with the SVN server is encrypted and secure. This means that Eclipse needs to know how the SSH protocol works. Below we'll discuss the solution.

Solution
Simply download any SSH client! Such tools include Putty and TortoiseSVN. Download Putty and reinstall Subclipse and see if the problem goes away. It should because when I installed Eclipse and Subclipse I already had Putty installed, and I never had this issue.

If your problem still exists for whatever reason, install TortoiseSVN and tell Subversion how to run SSH protocol by following these steps:

  • Install TortoiseSVN. Download the latest TortoiseSVN from their official website and install it.
  • Locate Subversion's configuration file. If you are using Windows 7 or Windows Vista it should be located at C:\Users\[User]\AppData\Roaming\Subversion\config. If you are using Windows XP it should be located at C:\Documents and Settings\%USERID%\Application Data\Subversion\config.
  • Edit Subversion's configuration file. Open it and locate the line where 'ssh' is commented out as follows "# ssh = $SVN_SSH ssh". This is where you need to let SVN know where the SSH executable file is. If you are using TortoiseSVN then change the line to 'ssh = C:/Program Files/TortoiseSVN/bin/TortoisePlink.exe'. If you don't want to enter user name and password every time you use SVN then change the line to 'ssh = C:/Program Files/TortoiseSVN/bin/TortoisePlink.exe -l user -pw password'
  • Check out your SVN project in Eclipse again

If you have any questions please let me know and I will do my best to help you!

0 komentar:

 
support by: infomediaku.com