Eclipse git saying Connection Refused - eclipse

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

Related

Can't fetch from private repository with EGit

I am trying to synchronise my eclipse java project with my private git repository using EGit plug-in but I'm being unsuccessful.
I have configured the remote origin as:
URI: git#github.com:username/project.git
Host: github.com
Repository path: username/project.git
Unfortunately, when I try to fetch, I get this error:
git#github.com:Maslor/wfmgr.git: ProxyHTTP: java.io.IOException: proxy error: >Forbidden
git#github.com:Maslor/wfmgr.git: ProxyHTTP: java.io.IOException: proxy error: >Forbidden
git#github.com:Maslor/wfmgr.git: ProxyHTTP: java.io.IOException: proxy error: >Forbidden
I am using a proxy, does that mean I have to configure EGit's proxy settings, if there are any? How can I do that?
There is a pending issue: bug 349702 EGit tries to use HTTP proxy for SSH connect.
If you don't need the proxy when connecting to ssh, try and remove said proxy.
Or use a proxy bypass, as illustrated in this bug report.
If not, try an https url (provided you have a username/password associated to the remote repo server)
You can try ssh git#github.com to first see if it is a problem with your IDE or also global to your system.
I then suggest you to follow this : SSH in git behind proxy on windows 7

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).

error while cloning a project in moovweb from commandline

I am new to moovweb. Using gitbash to login to moov server . After logging in I try to clone a project created successfully at moov web site from gitbash(as admin). I get the below error
$git clone moov#git.moovweb.com:bharath2k5/wikipedia.git
ssh:connect to host git.moovweb.com port 443: Bad file number
fatal:could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Also this is my .ssh/config.
Host git.moovweb.com
IdentityFile ~/.ssh/id_rsa
PreferredAuthentications publickey
Port 443
Thanks for your help.
It looks like your computer failed to connect to the moovweb git server (git.moovweb.com) so it didn't even get to the authentication step. I noticed you have a rule in your ssh config to use port 443 instead of 22. Does your network block port 22 access? It's possible that even with the configuration, git is still using port 22. You can check by running the following command:
Best way to check is to run the following command in git bash:
$ ssh -vv moov#git.moovweb.com
That should give you a lot of information, including which port ssh is trying to use.
Anyways, you can force git to use port 443 on a particular project by changing the URI used to clone the project. Try the following and see if it works:
$ git clone ssh://moov#git.moovweb.com:443/bharath2k5/wikipedia.git
If that works, it seems that the Port configuration in .ssh/config doesn't seem to apply to git operations.

Error in cloning from github

I am trying to clone a repository from github but havn't been able to successfully do so. Please help.I am getting
gaurav#gaurav-Lenovo-IdeaPad-Y500:~$ git clone https://github.com/gauravp94/eden.git
Cloning into 'eden'...
fatal: unable to access 'https://github.com/gauravp94/eden.git/': Failed connect to github.com:1080; Connection timed out
I am running internet thorough my college proxy on Ubuntu 13.10.
Thanks.
Your clone command is valid and working, so basically you seem to have either network problem, dns problem, routing problem or you just tried in moment github was doing something:
Failed connect to github.com:1080; Connection timed out
It works for me, so try again.
The url
https://github.com/gauravp94/eden.git/
is not accessible. Please try opening this url in browser IE. Check if you have access to this url.

How can I setup subversion with ssh tunnel in 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