How can I setup subversion with ssh tunnel in Eclipse? - eclipse

I have a remote server that hosts my subversion repository on a non-standard ssh port. I want to use Eclipse's subclipse plugin as my client end to access the SVN repository. I can access the repository fine by using svn+specialssh://... where specialssh is a tunnel profile setup in my ~/.subversion/config.
In subclipse I tried to input the URL of the repository as: svn+specialssh:// but that doesn't work.

First, I set up my tunnel to my repository, which lives behind the firewall on my home network:
ssh -L 9000:10.5.128.5:3690 root#<mypublicallyexposedaddress>
10.5.128.5 is the internal address of my repository host. Port 3690 is where svn listens.
Then in Eclipse, I configure the repository:
svn://localhost:9000/gwt
And there you go. This is not the only way to do it. I've also use an approach where Eclipse has to know it's ssh, and the plugin has to support it, which they do, but this approach is just my personal preference.
On second thought, you don't need anything that complicated. Try:
svn+ssh://host:port/directory

Add the ssh connection configuration to your ~/.ssh/config file:
Host svnserver
HostName your.real.hostname.here
Port 1234
User you
If you then specify "svnserver" as the hostname in any ssh/svn+ssh configuration, ssh should be able to resolve everything by simply reading your config file.

Something I used to do is have a shell script wrap my access to SSH, something like:
#!ssh1234.sh
ssh -P 1234 $*
And I'd tell my Eclipse svn plugin to use that script instead of "ssh", by setting the SVN_SSH environment variable:
export SVN_SSH=$HOME/scripts/ssh1234.sh

svn+ssh://host:port/directory
-> works 4 me like charm on debian server out of eclipse (flash builder 4.5) thanks Don Branson
my way of setting up subversion:
http://dwaver.files.wordpress.com/2011/08/subversion-notez-v1-0.pdf

Related

How to Clone a Git repository in Eclipse with non standard port on osx

My context:
My Git repository is on a Ubuntu Server where I changed the ssh port
On my client side (OS X) the syntax ssh host:port doesn't work
Using shell, the solution is simple: ssh host -p port
But, I'm using Eclipse and I need to clone my project from eclipse
When I used the standard port (22), the eclipse wizzard 'clone a git repository' was working fine but since I have changed the port, The wizzard failed:
I fill the following fields:
Host
Repository
Path
Protocol (ssh)
Port
user
password
I see in Eclipse window that URI is created with the syntax:
ssh://user#host:port/repository
so, as this syntax doesn't work in shell, I suppose it is the reason
I try this workaround:
Create a host in /.ssh/config
with an alias and my new port
And use the alias in the host field of Eclipse
It doesn't work and it seems Eclipse does not take in account my config file
After many google researches, I finally try asking a new question here
Many thanks for your help
Having just spent 3 days beating my head on the wall about this, I'm gonna answer you even though I'm a few years too late to help probably.
I noticed on the firewall of my git server that Eclipse was hitting port 22 no matter what port I specified in the dialog. After confirming I could manually connect with
ssh -i ~/.ssh/git-privkey -p 3215 git#git.example.com
And you should get connected and welcomed, then disconnected.
I set up my ~/.ssh/config file like so:
Host git.example.com
Hostname git.example.com
Port 3215
User git
IdentityFile ~/.ssh/git-privkey
It is important to have the Host value match the host that Eclipse will connect to, which will also match the Hostname value. If you don't do this, the host-specific configuration won't take effect.
Now test by connecting with just
ssh git.example.com
And you should get connected and welcomed, then disconnected.
Now, in Eclipse, simply copy/paste the SSH URI and leave the default port 22 set. Username should come in from the URI (default is git).

Eclipse git saying Connection Refused

I am trying to clone a git repository in Eclipse stored at a server (connected to my system via LAN).
This is what I am filling in the Import Projects From Git dialog:
the repository is stored at: /home/sajat/git in the server.
However, when i click Next, I get the following error:
Can someone tell me what am I doing wrong?
2 problems I see:
you are likely using the wrong port number, standard SSH is 22 and unless you have ssh listening on port 80 it will not work.
Also, you path is odd, /git is not the same as /home/sajat/git. Try using the long path.
You should follow this how-to if you're having trouble with a Git server create by your own

In Netbeans, can you do SSH connection for PHP Projects?

Netbean is great and I use it with FTP remote connection all the time. However, one of my client currently only have a SSH connection. Is there anyway to connect to it and up/down files?
Like it was mentioned, SFTP is supported in Netbeans by default.
So select "remote connection" in your project's run configuration and use your SSH connection information (host, login and pass). You don't have to provide any private key file.
I've had luck using sshfs (ssh file system) on ubuntu. I create created a mount folder in my home folder and run the following
$ sshfs domain\\user#server:/path/to/remote/folder ~/mount/local-mount-point
From there I start a new (or existing) project in Netbeans at that local folder ~/mount/local-mount-point
For a nicer set up, do a key exchange between your local box and the server (ssh-copy-id) for password-less ssh connections. Then, put the above command line in your .bashrc file.
I do the same as Richard.
In general is easier just to mount the remote filesystem and use netbeans in the mounted directory.
I just do the following :
sudo sshfs -o allow_other root#www.khosmos.com:/var/www/html /mnt/droplet/

Capistrano Net::SSH::Authentification::AgentError

I'm trying to set up capistrano for pushing my project, using git as VCS.
I'm running capistrano on a win7 machine, and want to push on my ubuntu 64bit EC2, here is what capistrano says: http://pastebin.com/FRyzYFbE
My local SSH Client is Putty, and works pretty fine, for my deploy.rb i've set something like: http://pastebin.com/UubfdDYm
Does anyone know what's going on there?
I don't have Win7, but I can tell you what worked for me on winXP. I added an SSH config file to %USER_HOME%/.ssh/config
The contents of that file look like this:
Host dev
User ubuntu
Hostname example.com
IdentityFile path/relative/to/user_home_ssh/mykey.ppk
The Host line can be the actual host or a nickname that you will use. Here, I used a short nickname. This should match the IP or hostname you use in your capistrano config.
The User should be the user you set in your capistrano config (ubunto in your case).
The Hostname is the real hostname or IP of the server you will access. The IdentityFile is a path relative to your USER_HOME/.ssh directory.
Ok, I found out that, because i have Git installed, the home directory for my ssh config is C:\Program Files\Git\.ssh
I had to fi several things there, and when it first works to connect via ssh in the command line (thanks to Git i have an SSH client installed), the connection was successfull.
There is still a bug, cause Capistrano can't do a local git command due to SSH key error, if i do the same command in the CLI, it works perfeclty. But I think I will stop using capistrano and use something easier, a remot git pull && /build.sh should do the trick.

Accessing SVN server from remote Ubuntu machine

I have installed svn (Subversion) on one Ubuntu machine. Its locally working fine.
I want to access this svn repository from another Ubuntu machine.
Could anybody explain how to access svn repository from other client Ubuntu machines.
Note: Both the systems are in the same LAN.
EDIT (taken from answer added by OP)
Julien and jazzbassrob..thnks for your ans..
#jazzbassrob:
I tried with the "svn co .." command on the client machine, but i got ..
root#xyz:~# svn co svn://ipaddress/usr/local/svn/repos/test
svn: /root/.subversion/config:16: Option expected
do we need to install svn on client side too..plz help
you will need to configure a http access to your repository, check this tutorial, it describes the way to install and configure the server (subversion and apache configuration)
You simply use an SVN URL which uses the name or IP address of your server. For example:
svn co svn://my-machine/path/to/svn/repos/project/trunk
The name of your machine is the bit after the '#' when you open a terminal. Or, you can find the IP address of the machine by typing ifconfig. For example, my IP address is 192.168.0.100:
wlan0 Link encap:Ethernet HWaddr --:--:--:--:--:--
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
As a further note, if you want to use a secure connection (i.e. svn+ssh://) you will need to configure an SSH server first.