SSH clone is not working... #4566

Closed
mallikarjunece opened this Issue Jul 16, 2013 · 6 comments

Comments

Projects
None yet
5 participants

Hi All,

I am getting the following error while cloning using ssh.

Please address about this issue at the earliest....

Cloning into 'testrep'...
/usr/local/lib/ruby/1.9.1/net/http.rb:762:in initialize': Connection refused - connect(2) (Errno::ECONNREFUSED) from /usr/local/lib/ruby/1.9.1/net/http.rb:762:inopen'
from /usr/local/lib/ruby/1.9.1/net/http.rb:762:in block in connect' from /usr/local/lib/ruby/1.9.1/timeout.rb:54:intimeout'
from /usr/local/lib/ruby/1.9.1/timeout.rb:99:in timeout' from /usr/local/lib/ruby/1.9.1/net/http.rb:762:inconnect'
from /usr/local/lib/ruby/1.9.1/net/http.rb:755:in do_start' from /usr/local/lib/ruby/1.9.1/net/http.rb:744:instart'
from /home/git/gitlab-shell/lib/gitlab_net.rb:56:in get' from /home/git/gitlab-shell/lib/gitlab_net.rb:17:inallowed?'
from /home/git/gitlab-shell/lib/gitlab_shell.rb:51:in validate_access' from /home/git/gitlab-shell/lib/gitlab_shell.rb:21:inexec'
from /home/git/gitlab-shell/bin/gitlab-shell:16:in `

'
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Thanks,
Mallikarjuna

Contributor

jojosch commented Jul 16, 2013

Can gitlab-shell connect to GitLab using the URL specified in /home/git/gitlab-shell/config.yml? Also check using /home/git/gitlab-shell/bin/check.

Hi @jojosch , can you explain in detail....
I tried this , but still not working.
Also, let me know the cause for this , so that i won't do these mistakes in future...because this is working upto now....

Contributor

dplarson commented Jul 17, 2013

Please provide the requested info from here about submitting issues: https://github.com/gitlabhq/gitlabhq/blob/master/CONTRIBUTING.md

This error is likely caused by something being misconfigured. Try these test scripts (available in all Gitlab versions):

# go to the gitlab directory
cd /home/git/gitlab

# run the gitlab check script as the git user
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

# run the gitlab-shell check script
sudo -u git -H ./home/git/gitlab-shell/bin/check

Hi @dplarson ,

I tried all these , everything is fine, but the problem is with ssh (authentication) see the error trace...

Please let me know the cause for this error....

*_@__:$ ssh -vT git@git
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to git [192.168.5.231] port 22.
debug1: Connection established.
debug1: identity file /home/likewise-open/ZOHOCORP/malli-0370/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/likewise-open/ZOHOCORP/malli-0370/.ssh/id_rsa-cert type -1
debug1: identity file /home/likewise-open/ZOHOCORP/malli-0370/.ssh/id_dsa type -1
debug1: identity file /home/likewise-open/ZOHOCORP/malli-0370/.ssh/id_dsa-cert type -1
debug1: identity file /home/likewise-open/ZOHOCORP/malli-0370/.ssh/id_ecdsa type -1
debug1: identity file /home/likewise-open/ZOHOCORP/malli-0370/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA d0:fe💿4d:aa:9f:e7:6d:c7:26:4c:b0:fb:74:08:94
debug1: Host 'git' is known and matches the RSA host key.
debug1: Found key in /home/likewise-open/ZOHOCORP/malli-0370/.ssh/known_hosts:18
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/likewise-open/ZOHOCORP/malli-0370/.ssh/id_rsa
debug1: Remote: Forced command: /home/git/gitlab-shell/bin/gitlab-shell key-8
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Remote: Forced command: /home/git/gitlab-shell/bin/gitlab-shell key-8
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Authentication succeeded (publickey).
Authenticated to git ([192.168.5.231]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_IN
/usr/local/lib/ruby/1.9.1/net/http.rb:762:in initialize': Connection refused - connect(2) (Errno::ECONNREFUSED) from /usr/local/lib/ruby/1.9.1/net/http.rb:762:inopen'
from /usr/local/lib/ruby/1.9.1/net/http.rb:762:in block in connect' from /usr/local/lib/ruby/1.9.1/timeout.rb:54:intimeout'
from /usr/local/lib/ruby/1.9.1/timeout.rb:99:in timeout' from /usr/local/lib/ruby/1.9.1/net/http.rb:762:inconnect'
from /usr/local/lib/ruby/1.9.1/net/http.rb:755:in do_start' from /usr/local/lib/ruby/1.9.1/net/http.rb:744:instart'
from /home/git/gitlab-shell/lib/gitlab_net.rb:56:in get' from /home/git/gitlab-shell/lib/gitlab_net.rb:24:indiscover'
from /home/git/gitlab-shell/lib/gitlab_shell.rb:28:in exec' from /home/git/gitlab-shell/bin/gitlab-shell:16:in

'
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2752, received 3624 bytes, in 5.2 seconds
Bytes per second: sent 526.8, received 693.7
debug1: Exit status 1
_@_:$

Thanks jojosch i have the same problème and your solution relove my problème

Owner

jacobvosmaer commented Jul 18, 2013

Thanks for your interest in GitLab. We don't use the GitHub issue tracker for support requests and configuration questions. Please use the support forum, Stack Overflow, or the http://www.gitlab.com paid services for this purpose. Have a look at the contribution guidelines for more information.

Feel free to reopen the issue or create a new one if you are convinced this is not a configuration issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment