Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-10231

RPC failed; result=55, HTTP code = 0 on git push origin

    XMLWordPrintable

Details

    Description

      Hi there,

      I was previously pushing to bb via HTTPS just fine, but as of about 21 hours ago I got this error on git push: "RPC failed; result=55, HTTP code = 0". I did some googling, tried increasing the post buffer size which didn't help, unsuprising as I am only pushing a few small files.

      Aaanyway, I thought I'd try using ssh as I was tired of putting in my password. I have ssh + ssh agent set up fine I think, this is on Ubuntu and I use ssh agent to log in to my VPS.

      Here's was my setup at the time:

      #!python
      
      
      jon@pro:bbb$ cat ./.git/config
      [core]
              repositoryformatversion = 0
              filemode = true
              bare = false
              logallrefupdates = true
      [remote "origin"]
              fetch = +refs/heads/*:refs/remotes/origin/*
              url = git@bitbucket.org:jpw/eve-bbb.git
      [branch "master"]
              remote = origin
              merge = refs/heads/master
      jon@pro:bbb$ cat ~/.ssh/config
      Host bitbucket.org
              HostName bitbucket.org
              User git
              IdentityFile ~/.ssh/id_dsa
      jon@pro:bbb$ ssh -vvvvT git@bitbucket.org
      OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
      debug1: Reading configuration data /home/jon/.ssh/config
      debug1: /home/jon/.ssh/config line 1: Applying options for bitbucket.org
      debug1: Reading configuration data /etc/ssh/ssh_config
      debug1: /etc/ssh/ssh_config line 19: Applying options for *
      debug2: ssh_connect: needpriv 0
      debug1: Connecting to bitbucket.org [131.103.20.167] port 22.
      debug1: Connection established.
      debug3: Incorrect RSA1 identifier
      debug3: Could not load "/home/jon/.ssh/id_dsa" as a RSA1 public key
      debug1: identity file /home/jon/.ssh/id_dsa type 2
      debug1: identity file /home/jon/.ssh/id_dsa-cert type -1
      debug1: Enabling compatibility mode for protocol 2.0
      debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
      debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
      debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
      debug2: fd 3 setting O_NONBLOCK
      debug3: load_hostkeys: loading entries for host "bitbucket.org" from file "/home/jon/.ssh/known_hosts"
      debug3: load_hostkeys: loaded 0 keys
      debug1: SSH2_MSG_KEXINIT sent
      debug1: SSH2_MSG_KEXINIT received
      debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
      debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-rsa,ssh-dss
      debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
      debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
      debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
      debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
      debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
      debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
      debug2: kex_parse_kexinit:
      debug2: kex_parse_kexinit:
      debug2: kex_parse_kexinit: first_kex_follows 0
      debug2: kex_parse_kexinit: reserved 0
      debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
      debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
      debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
      debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
      debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
      debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
      debug2: kex_parse_kexinit: none,zlib@openssh.com
      debug2: kex_parse_kexinit: none,zlib@openssh.com
      debug2: kex_parse_kexinit:
      debug2: kex_parse_kexinit:
      debug2: kex_parse_kexinit: first_kex_follows 0
      debug2: kex_parse_kexinit: reserved 0
      debug2: mac_setup: setup hmac-md5
      debug1: kex: server->client aes128-ctr hmac-md5 none
      debug2: mac_setup: setup hmac-md5
      debug1: kex: client->server aes128-ctr hmac-md5 none
      debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
      debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
      
      

      [hangs]

      So it failed on "debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP"

      After doing some googling, I tried uncommenting the following two lines in /etc/ssh/ssh_config

      #!python
      
         Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
         MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
      

      I can now connect at least, but still can't push

      #!python
      
      
      jon@pro:bbb$ ssh -vvvvT git@bitbucket.org
      OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
      debug1: Reading configuration data /home/jon/.ssh/config
      debug1: /home/jon/.ssh/config line 1: Applying options for bitbucket.org
      debug1: Reading configuration data /etc/ssh/ssh_config
      debug1: /etc/ssh/ssh_config line 19: Applying options for *
      debug3: ciphers ok: [aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc]
      debug3: macs ok: [hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160]
      debug2: ssh_connect: needpriv 0
      debug1: Connecting to bitbucket.org [131.103.20.167] port 22.
      debug1: Connection established.
      debug3: Incorrect RSA1 identifier
      debug3: Could not load "/home/jon/.ssh/id_dsa" as a RSA1 public key
      debug1: identity file /home/jon/.ssh/id_dsa type 2
      debug1: identity file /home/jon/.ssh/id_dsa-cert type -1
      debug1: Enabling compatibility mode for protocol 2.0
      debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
      debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
      debug1: match: OpenSSH_5.3 pat OpenSSH_5* compat 0x0c000000
      debug2: fd 3 setting O_NONBLOCK
      debug1: SSH2_MSG_KEXINIT sent
      debug1: SSH2_MSG_KEXINIT received
      debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
      debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-rsa,ssh-dss
      debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
      debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
      debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
      debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
      debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
      debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
      debug2: kex_parse_kexinit:
      debug2: kex_parse_kexinit:
      debug2: kex_parse_kexinit: first_kex_follows 0
      debug2: kex_parse_kexinit: reserved 0
      debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
      debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
      debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
      debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
      debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
      debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
      debug2: kex_parse_kexinit: none,zlib@openssh.com
      debug2: kex_parse_kexinit: none,zlib@openssh.com
      debug2: kex_parse_kexinit:
      debug2: kex_parse_kexinit:
      debug2: kex_parse_kexinit: first_kex_follows 0
      debug2: kex_parse_kexinit: reserved 0
      debug2: mac_setup: setup hmac-md5
      debug1: kex: server->client aes128-ctr hmac-md5 none
      debug2: mac_setup: setup hmac-md5
      debug1: kex: client->server aes128-ctr hmac-md5 none
      debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
      debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
      debug2: bits set: 1541/3072
      debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
      debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
      debug1: Server host key: RSA 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40
      The authenticity of host &#x27;bitbucket.org (131.103.20.167)&#x27; can&#x27;t be established.
      RSA key fingerprint is 97:8c:1b:f2:6f:14:6b:5c:3b:ec:aa:46:46:74:7c:40.
      Are you sure you want to continue connecting (yes/no)? yes
      Warning: Permanently added &#x27;bitbucket.org,131.103.20.167&#x27; (RSA) to the list of known hosts.
      debug2: bits set: 1542/3072
      debug1: ssh_rsa_verify: signature correct
      debug2: kex_derive_keys
      debug2: set_newkeys: mode 1
      debug1: SSH2_MSG_NEWKEYS sent
      debug1: expecting SSH2_MSG_NEWKEYS
      debug2: set_newkeys: mode 0
      debug1: SSH2_MSG_NEWKEYS received
      debug1: Roaming not allowed by server
      debug1: SSH2_MSG_SERVICE_REQUEST sent
      debug2: service_accept: ssh-userauth
      debug1: SSH2_MSG_SERVICE_ACCEPT received
      debug2: key: /home/jon/.ssh/id_dsa (0xb8b9bf98), explicit
      debug1: Authentications that can continue: publickey
      debug3: start over, passed a different list publickey
      debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
      debug3: authmethod_lookup publickey
      debug3: remaining preferred: keyboard-interactive,password
      debug3: authmethod_is_enabled publickey
      debug1: Next authentication method: publickey
      debug1: Offering DSA public key: /home/jon/.ssh/id_dsa
      debug3: send_pubkey_test
      debug2: we sent a publickey packet, wait for reply
      debug1: Remote: Forced command: conq username:jpw
      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-dss blen 433
      debug2: input_userauth_pk_ok: fp 5d:40:b3:06:a7:42:c9:22:c4:53:54:f5:65:0b:09:12
      debug3: sign_and_send_pubkey: DSA 5d:40:b3:06:a7:42:c9:22:c4:53:54:f5:65:0b:09:12
      debug1: Remote: Forced command: conq username:jpw
      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 bitbucket.org ([131.103.20.167]:22).
      debug1: channel 0: new [client-session]
      debug3: ssh_session2_open: channel_new: 0
      debug2: channel 0: send open
      debug1: Requesting no-more-sessions@openssh.com
      debug1: Entering interactive session.
      debug2: callback start
      debug2: fd 3 setting TCP_NODELAY
      debug3: packet_set_tos: set IP_TOS 0x08
      debug2: client_session2_setup: id 0
      debug1: Sending environment.
      debug3: Ignored env SSH_AGENT_PID
      debug3: Ignored env XDG_SESSION_ID
      debug3: Ignored env TERM
      debug3: Ignored env SHELL
      debug3: Ignored env SSH_CLIENT
      debug3: Ignored env OLDPWD
      debug3: Ignored env SSH_TTY
      debug3: Ignored env USER
      debug3: Ignored env LS_COLORS
      debug3: Ignored env SSH_AUTH_SOCK
      debug3: Ignored env MAIL
      debug3: Ignored env PATH
      debug3: Ignored env PWD
      debug1: Sending env LANG = en_GB.UTF-8
      debug2: channel 0: request env confirm 0
      debug3: Ignored env SHLVL
      debug3: Ignored env HOME
      debug3: Ignored env LOGNAME
      debug3: Ignored env SSH_CONNECTION
      debug3: Ignored env LESSOPEN
      debug3: Ignored env XDG_RUNTIME_DIR
      debug3: Ignored env LESSCLOSE
      debug3: Ignored env git
      debug3: Ignored env ssh
      debug3: Ignored env _
      debug2: channel 0: request shell confirm 1
      debug2: callback done
      debug2: channel 0: open confirm rwindow 0 rmax 32768
      debug2: channel 0: rcvd adjust 2097152
      debug2: channel_input_status_confirm: type 99 id 0
      debug2: shell request accepted on channel 0
      logged in as jpw.
      
      You can use git or hg to connect to Bitbucket. Shell access is disabled.
      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
      debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
      debug2: channel 0: rcvd eow
      debug2: channel 0: close_read
      debug2: channel 0: input open -> closed
      debug2: channel 0: rcvd close
      debug3: channel 0: will not send data after close
      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
      debug3: channel 0: status: The following connections are open:
        BCLOUD-0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)
      
      Transferred: sent 2784, received 3544 bytes, in 0.2 seconds
      Bytes per second: sent 11490.7, received 14627.5
      debug1: Exit status 0
      jon@pro:bbb$ git push origin master
      Counting objects: 34, done.
      Delta compression using up to 2 threads.
      Compressing objects: 100% (26/26), done.
      Writing objects: 100% (26/26), 3.00 KiB | 0 bytes/s, done.
      Total 26 (delta 21), reused 0 (delta 0)
      Connection to bitbucket.org closed by remote host.
      fatal: The remote end hung up unexpectedly
      fatal: The remote end hung up unexpectedly
      jon@pro:bbb$
      
      

      So still no dice, I then tried going back to HTTPS.

      #!python
      
      
      jon@pro:bbb$ GIT_CURL_VERBOSE=1  git push -u origin master
      
      ...
      
      * Connected to bitbucket.org (131.103.20.167) port 443 (#2)
      * found 164 certificates in /etc/ssl/certs/ca-certificates.crt
      * SSL re-using session ID
      *        server certificate verification OK
      *        common name: bitbucket.org (matched)
      *        server certificate expiration date OK
      *        server certificate activation date OK
      *        certificate public key: RSA
      *        certificate version: BCLOUD-3
      *        subject:
      *        start date: Wed, 05 Mar 2014 00:00:00 GMT
      
      *        expire date: Wed, 25 May 2016 12:00:00 GMT
      
      *        issuer: C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert High Assurance EV CA-1
      *        compression: NULL
      *        cipher: AES-128-CBC
      *        MAC: SHA256
      * Server auth using Basic with user &#x27;jpw&#x27;
      > POST /jpw/eve-bbb.git/git-receive-pack HTTP/1.1
      Authorization: Basic [snip]
      User-Agent: git/1.9.1
      Host: bitbucket.org
      Accept-Encoding: gzip
      Content-Type: application/x-git-receive-pack-request
      Accept: application/x-git-receive-pack-result
      Content-Length: 3224
      
      * upload completely sent off: 3224 out of 3224 bytes
      * GnuTLS recv error (-9): A TLS packet with unexpected length was received.
      * Closing connection 2
      error: RPC failed; result=56, HTTP code = 0
      fatal: The remote end hung up unexpectedly
      fatal: The remote end hung up unexpectedly
      Everything up-to-date
      jon@pro:bbb$
      
      

      OK maybe a GnuTLS bug! ("GnuTLS recv error (-9): A TLS packet with unexpected length was received.")

      Have just spent an hour building git from src, so git now uses openssl not GnuTLS.

      It still does not work, but i don't get the Gnu message any more, just "Empty reply from server";

      #!python
      
      
      jon@pro:bbb$ GIT_CURL_VERBOSE=1 /home/jon/git-openssl/git-1.9.1/git push -u origin master
      ...
      > POST /jpw/eve-bbb.git/git-receive-pack HTTP/1.1
      Authorization: Basic [snip]
      User-Agent: git/1.9.1
      Host: bitbucket.org
      Accept-Encoding: gzip
      Content-Type: application/x-git-receive-pack-request
      Accept: application/x-git-receive-pack-result
      Content-Length: 3224
      
      * upload completely sent off: 3224 out of 3224 bytes
      * Empty reply from server
      * Connection BCLOUD-2 to host bitbucket.org left intact
      error: RPC failed; result=52, HTTP code = 0
      fatal: The remote end hung up unexpectedly
      fatal: The remote end hung up unexpectedly
      Everything up-to-date
      
      

      I am now out of clues. I've spent about 6+ hours on this, have sent 4+ emails to support@ starting 21 hours ago and heard absolutely nothing back, so am raising ticket. Thanks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            4a5c8215b42c jpw
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: