fatal: The remote end hung up unexpectedly

898 views
Skip to first unread message

Sebastian August

unread,
Apr 17, 2012, 5:59:08 AM4/17/12
to gito...@googlegroups.com
Hi I'm trying to do my first push to a repo in a private install of gitorious.
I normally log into the host server with ssh without password using RSA private/public keys.
But when I try to use RSA keys for gitorious, it fails to push to a new repo in the admin user.

I do git push origin master and after some time get the error:

fatal: The remote end hung up unexpectedly

On the server,

tail -f /var/log/auth.log shows:

sshd[2347]: Accepted publickey for git from my_server

but

tail -f log/gitorious_auth.log shows:

FATAL -- : Errno::ETIMEDOUT Operation timed out - connect(2): /usr/local/lib/ruby/1.8/net/http.rb:560:in `initialize'

On the client,

ssh -T -vv my_server shows amongst other lines:


debug1: Connecting to my_server
debug1: Connection established.

debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /Users/MyUser/.ssh/id_rsa type 1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.5p1 FreeBSD-20061110
debug1: match: OpenSSH_4.5p1 FreeBSD-20061110 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2

debug1: Host 'my_server' is known and matches the DSA host key.
debug1: Found key in /Users/MyUser/.ssh/known_hosts:9
debug1: ssh_dss_verify: signature correct

debug1: Offering public key: /Users/MyUser/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Remote: Forced command: gitorious admin
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 533
debug2: input_userauth_pk_ok: fp 7d:23:30:ca:03:39:54:0f:a2:f8:d5:b7:9b:84:42:9f
debug1: Remote: Forced command: gitorious admin
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Authentication succeeded (publickey).

Welcome, admin. Use git to push/pull your repositories

debug2: channel 0: written 55 to efd 6
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd close
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2944, received 2984 bytes, in 0.1 seconds
Bytes per second: sent 22948.7, received 23260.5
debug1: Exit status 1

Is there anything I'm missing here?
Once this is working I should be able to start using this cool app without problems.
Thanks

Marius Mårnes Mathiesen

unread,
Apr 17, 2012, 9:38:32 AM4/17/12
to gito...@googlegroups.com
On Tue, Apr 17, 2012 at 11:59 AM, Sebastian August <sebastain...@gmail.com> wrote:
Hi I'm trying to do my first push to a repo in a private install of gitorious.
I normally log into the host server with ssh without password using RSA private/public keys.
But when I try to use RSA keys for gitorious, it fails to push to a new repo in the admin user.

I do git push origin master and after some time get the error:

fatal: The remote end hung up unexpectedly

On the server,

tail -f /var/log/auth.log shows:

sshd[2347]: Accepted publickey for git from my_server

but

tail -f log/gitorious_auth.log shows:

FATAL -- : Errno::ETIMEDOUT Operation timed out - connect(2): /usr/local/lib/ruby/1.8/net/http.rb:560:in `initialize'

Gitorious will connect to itself over HTTP to check permissions when you try to push, this error message suggests this connection times out.
It will try connecting using to the host and port specified in gitorious.yml as:

- gitorious_client_host
- gitorious_client_port

Make sure those are configured properly in the production section and that your server indeed responds on that host and port.

Cheers,
- Marius

Sebastian August

unread,
Apr 17, 2012, 6:36:30 PM4/17/12
to gito...@googlegroups.com
I have 3 run conditions that may be causing the time out:

1. I'm using a numeric IP address.
    Web access hasn't had any problems eg I can login/out and create users/keys/projects.
    But I still get a fatal error using git to push from local to remote.

2. I'm running gitorious not from a subdomain/vhost but in suburl/folder eg numeric_ip_address/gitorious
    Again, web access to gitorious is resolving without problems.

3. I have gitorious running on port 80 but behind a reverse proxy that changes all http to https (443).
    I have ssl set to to true in gitorious.yml so that all pages are sent as https.
    If I have ssl set to true, should gitorious_client_port be 443?
    It doesn't seem to matter for web access as the reverse proxy is converting http to https fine.
    But of course, I still cannot push using git from local to remote.
   
These may seem rather messy complications, but they are quite standard real world settings, at least in a small underfunded pre-launch startup. =)

I need to use a numeric ip for hostname, so having gitorious in a subfolder is easier, and using a reverse proxy allows easy switching to different production servers based on suburls eg /gitorious while it serves https to PCs with private ssl certs used by developers remotely logging into dev apps eg /redmine.

I appreciate your help Marius and hope you can help me work around these conditions because it appears I am very close to having git pushing to gitorious, which will complete this gitorious installation.

I have tried to change the gitorious.yml settings you suggested but get the same fatal error while the gitorious log now shows that the hostname/servname isn't resolved.

This is what I am trying:

gitorious_client_port: 80

gitorious_client_host: numeric_ip_address/gitorious

gitorious_host: numeric_ip_address


I hope you can help me fix this.

Regards
 Seb
Reply all
Reply to author
Forward
0 new messages