Issue #6331 on hold

ssh_exchange_identification: Connection closed by remote host (BB-10785)

Peter Eisentraut
created an issue

I have a cron job that pulls from a bitbucket repository once an hour. Every so often, the cron job emails me

ssh_exchange_identification: Connection closed by remote host
fatal: The remote end hung up unexpectedly

This started a few weeks ago with this happening perhaps once every few days. Now it's getting worse, happening almost every hour.

To check, I set up the same cron job on a completely separate host, and it's showing the same behavior. So I suspect the problem is on the server's end.

Comments (204)

  1. Brian Nguyen staff

    Hey,

    Are you still seeing this problem? We have been experiencing some performance issues in the last couple of days that may be causing this.

    If you are still experiencing this, would you be able to run this?

    GIT_CURL_VERBOSE=1 git pull origin
    

    It should give us a better idea of where the problem is occurring.

    Cheers, Brian

  2. Brian Hrebec

    Just wanted to chime in that I've been seeing an identical error; it happened very frequently (almost every other request) a few weeks ago, but has decreased to the point where it only happens a couple of times per day.

    Curiously enough, I haven't been able to trigger the problem while running git manually. It only seems to occur in a cron job.

  3. Brian Nguyen staff

    Hi Peter,

    Unfortunately, I am not able to diagnose the issue with the information at hand. It would be handy to see exactly where in the process the connection is being severed. Does git pull --verbose work?

    Just to get a better idea of the environment, could you answer a few questions:

    • Does it happen for any of your other repositories?
    • How large is the repository, and how frequently is it updated?
    • Does the cron job pull from the repository or does it create a clone?

    Cheers, Brian

  4. Brian Hrebec

    I haven't turned up anything interesting with git (pull|fetch) --verbose (The error occurs first thing, and no additional messages are shown), so I've added ssh -vvv git@bitbucket.org to the crontab in hopes of getting more detail. Will report back if it triggers the same problem.

    To answer some of the above questions:

    • It happens randomly over every repository I've tried.
    • Some repositories are quite small and have only been updated once or twice since being moved to bitbucket, another is medium-sized and is updated many times per day.
    • For me, it happens with a pull; I don't use clone in crontab and haven't noticed it causing a problem.
    • Based on limited testing, https doesn't have any problems, but I won't be sure until it's ran a bit longer.
  5. Erik van Zijst staff

    We found a faulty SSH daemon that we killed, which I suspect has been the cause for these issues.

    Please reopen this issue if you still see the problem going forward.

  6. Anadi Misra

    Hi!

    I am experiencing the same issue here, though not sure if it is misconfiguration on my side or anything else. port 22 is blocked in my office so this is what I did to

    ~/.ssh/confg
    

    file

      Host bitbucket.org
      User git
      Hostname altssh.bitbucket.org
      IdentityFile ~/.ssh/git_id_rsa
      IdentitiesOnly yes
      Port 443
    

    Saw this in bitbucket confluence site that we can use URL of the form

    ssh://git@altssh.bitbucket.org:443/username/gitrepo
    

    hence these changes

    here is the output

    $ ssh -vT git@bitbucket.org
    OpenSSH_6.2p2, OpenSSL 1.0.1e 11 Feb 2013
    debug1: Reading configuration data /home/misraa3/.ssh/config
    debug1: /home/misraa3/.ssh/config line 7: Applying options for bitbucket.org
    debug1: Connecting to bitbucket.org [131.103.20.168] port 443.
    debug1: Connection established.
    debug1: identity file /home/misraa3/.ssh/git_id_rsa type 1
    debug1: identity file /home/misraa3/.ssh/git_id_rsa-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.2
    debug1: ssh_exchange_identification: <html>
    debug1: ssh_exchange_identification: <head><title>400 Bad Request</title></head>
    debug1: ssh_exchange_identification: <body bgcolor="white">
    debug1: ssh_exchange_identification: <center><h1>400 Bad Request</h1></center>
    debug1: ssh_exchange_identification: <hr><center>nginx/1.5.3</center>
    debug1: ssh_exchange_identification: </body>
    debug1: ssh_exchange_identification: </html>
    ssh_exchange_identification: Connection closed by remote host
    
  7. JenkinsEgmont

    I am experiencing this same thing. My script resolves branches (using git ls-remote) every minute from github via ssh and this issue happens in interesting points of time:

    Date: Wed, 12 Mar 2014 14:00:02 +0000 (UTC)
    Date: Wed, 12 Mar 2014 15:00:02 +0000 (UTC)
    Date: Wed, 12 Mar 2014 16:30:03 +0000 (UTC)
    Date: Wed, 12 Mar 2014 18:00:03 +0000 (UTC)
    Date: Wed, 12 Mar 2014 18:00:03 +0000 (UTC)
    Date: Wed, 12 Mar 2014 22:00:02 +0000 (UTC)
    Date: Thu, 13 Mar 2014 00:00:02 +0000 (UTC)
    Date: Thu, 13 Mar 2014 02:30:02 +0000 (UTC)
    Date: Thu, 13 Mar 2014 03:00:02 +0000 (UTC)
    Date: Thu, 13 Mar 2014 03:00:02 +0000 (UTC)
    Date: Thu, 13 Mar 2014 04:20:02 +0000 (UTC)
    Date: Thu, 13 Mar 2014 04:30:02 +0000 (UTC)
    Date: Thu, 13 Mar 2014 05:00:02 +0000 (UTC)
    Date: Thu, 13 Mar 2014 05:30:02 +0000 (UTC)
    Date: Thu, 13 Mar 2014 06:00:02 +0000 (UTC)
    Date: Thu, 13 Mar 2014 06:00:02 +0000 (UTC)
    
  8. Mark Alexander

    I have cron-ed pulls every few minutes. This morning I came into over 1500 failure emails.

    These pulls are how our production deployments are triggered. The need to be much more reliable.

  9. Ethan Kaminski

    Looks like someone has opened issue #9685 for the new recurrence of this fault.

    I've seen this twice in manually-triggered script runs this week. We have a test server that's maintained using scripts, and those scripts have generated error messages about ssh_exchange_identification. I've not seen the issue (yet) when working locally.

  10. Meritoo.pl Realizacje interaktywne

    Same problem here. Details:

    Failed to update git@bitbucket.org:<name-of-repository>.git, package information from this repository may be outdated (ssh_exchange_identification: Connection closed by remote host
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    error: Could not fetch origin
    )
    

    When it wil be fixed?

  11. Shamasis Bhattacharya

    Hi,

    We at FusionCharts are experiencing the same problem too. Since last week we are having one in three automated builds fail with error ssh_exchange_identification: Connection closed by remote host while cloning submodules. (We have quite a few of them in a single repository. That's a different story!)

    No doubt that the frequency has reduced. But we are still facing this while cloning submodules during our CI builds at a rate of 1 in 10. Interestingly, not all submodules fail to clone. Random ones fail in builds.

  12. Hannes Ebner

    I am experiencing the same problem; several repositories fail to be pulled regularly and I have to retry several times before the operation completes successfully.

  13. ashley stovall

    im having the same issue, teamcity goes kaplooy at least 3 times a day.

    its hard for me to tell you what teamcity was doing at the times of failure...ill turn up logging to see if that helps.

    what i can tell you though is that i have a script that run git pull on 53 repos using 4 concurrent threads and it appears that 1 of these concurrent requests fails with this error (remote end hung up). if you change the script to pull the repos linearly, it almost never fails. from my end, it feels concurrent volume related.

    ill turn up the verbosity of my script to see what that yields at the ssh layer.

  14. Marcus Bertrand staff

    For everyone following this issue, can we get a little more detail? We are struggling to reproduce this. Does it happen immediately or does the command run for a while then fail? Also, when it happens, do all connections then continue to fail until a period of time has passed with no attempts? Or does it feel random?

  15. Stan Hu

    I am using the SSH protocol (port 22) to pull from private repositories. The failure feels random, and the command fails pretty quickly when it does. Connections usually work after I retry again.

  16. Mark Alexander

    Marcus, It fails immediately because SSH is refusing the initial exchange. Retrying immediately almost always works. I suspect the association with cron means there's a bunch of connections at 5, 10, 15, etc, minute intervals so you're getting spikes of many ssh handshakes.

    I recommend reviewing the MaxSessions and MaxStartups SSHD options. The default of MaxSessions is only 10. It doesn't take many time-sync'ed cron jobs to max that out.

  17. Matt Diiorio

    Here's what I get from ssh with verbosity turned up:

    OpenSSH_6.0p1 Debian-4, OpenSSL 1.0.1e 11 Feb 2013
    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.com [131.103.20.172] port 22.
    debug1: Connection established.
    debug1: permanently_set_uid: 0/0
    debug3: Incorrect RSA1 identifier
    debug3: Could not load "/root/.ssh/id_rsa" as a RSA1 public key
    debug1: identity file /root/.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 /root/.ssh/id_rsa-cert type -1
    debug1: identity file /root/.ssh/id_dsa type -1
    debug1: identity file /root/.ssh/id_dsa-cert type -1
    debug1: identity file /root/.ssh/id_ecdsa type -1
    debug1: identity file /root/.ssh/id_ecdsa-cert type -1
    ssh_exchange_identification: Connection closed by remote host
    fatal: The remote end hung up unexpectedly
    
  18. Marcus Bertrand staff

    Thanks for the help everyone. We now see clearly how to reproduce this and are looking at what we need to do next. Keep an eye on this issue for more info/questions.

  19. Ryuhei Ishibashi

    Here's the same problem in hg.
    Details :

    running ssh hg@bitbucket.org 'hg -R uzabase/speenya serve --stdio'
    sending hello command
    sending between command
    remote: ssh_exchange_identification: Connection closed by remote host
    abort: no suitable response from remote hg!
    
  20. Ryuhei Ishibashi

    Here's the same problem in hg.
    Details :

    running ssh hg@bitbucket.org 'hg -R uzabase/speenya serve --stdio'
    sending hello command
    sending between command
    remote: ssh_exchange_identification: Connection closed by remote host
    abort: no suitable response from remote hg!
    
  21. Steve Muskiewicz

    Same issue here (ssh port 22). Not sure if the timing is significant but I appeared to be seeing more failures than usual running at around 3am ET (though my cron entry is limited to when it runs). Prior to June 6th, we never saw any of these issues at all.

  22. Chris Pook

    I've been seeing these periodically whilst running Composer install/update commands. The clones fail with

    [RuntimeException]
      Failed to execute git clone --no-checkout "git@bitbucket.org:company
      /project-dependency.git" "C:\wamp\www\project\vendor\company/dependency" && cd /D "C:\wamp\www\project\vendor\company/dependency"
      && git remote add composer "git@bitbucket.org:company/project-dependency.git" && git fetch composer
    
      ssh_exchange_identification: Connection closed by remote host
      fatal: Could not read from remote repository.
    
      Please make sure you have the correct access rights
      and the repository exists.
    
  23. Erik van Zijst staff

    That's discouraging, but thanks for letting me know. I'll dive back in.

    What errors are you seeing exactly (to confirm we're not looking at a different issue)? You're seeing ssh_exchange_identification errors?

  24. ericatienza

    same as Mark, better but still not resolved. and to answer to Erik : $git pull ssh_exchange_identification: Connection closed by remote host fatal: The remote end hung up unexpectedly

  25. Erik van Zijst staff

    Excellent! I was hoping to hear that. After the initial reports of some lingering issues last week we found another issue that we addressed. Since then we've been unable to reproduce the issue ourselves and so it's encouraging to read your feedback.

    I'm going to close this issue again, however if anyone is still seeing systemic issues, feel tree to reopen once more.

  26. jsashi

    This issue is back again after a week. Can we re-open this bug?

    Edit: It's not happening anymore now. Will update if it happens again.

  27. Ethan Kaminski

    Erik - we may have experienced two recurrences of this issue, approximately 15 minutes and 30 minutes before jsashi commented. My evidence for this is some unexpected script failures - unfortunately, the script in question discards stderr, so I can't say for sure whether it's the same error, nor can I offer any specifics.

  28. jsashi

    Erik van Zijst I have edited my original comment saying it's not happening anymore now. But just for your info, it's the same error message with another variation at times:

    Permission denied (publickey). fatal: The remote end hung up unexpectedly

    However, most of the times, it's: ssh_exchange_identification: Connection closed by remote host fatal: The remote end hung up unexpectedly

  29. Dominik Bruhn

    Same problem here: $ git fetch --all Fetching origin ssh_exchange_identification: Connection closed by remote host fatal: The remote end hung up unexpectedly error: Could not fetch origin

  30. Mark Alexander

    Subtle difference this time. We've implemented 3 retries due to this issue and that was working around the problem before this last occurence. We've had 11 times overnight where 3 consecutive tries failed. All but 1 failure was the ssh_exchange_identification failure. The other was the "Permision denied" noted by jsashi.

    Good luck!

  31. Andrew Kerr

    We received it again today too: Error: Command failed: ssh_exchange_identification: Connection closed by remote host

    First time in about a week for us.

  32. George Milonas

    I am getting the exact issues everybody reported and its an intermittent issue. We have about 30 servers checking and pulling every 5mins. This is unbelievable. Our app is going crazy...Anyone has any idea about avoid this issue?

  33. Mark Sibert

    I can't clone/pull any of my repositories (I'm using hg). I'm getting the same ssh_exchange_identification error that everyone else is reporting.

  34. Erik van Zijst staff

    I've got trouble reproducing these problems. We did have a little bit of an unrelated issue that caused some hiccups on the SSH front on Sunday, which has since been addressed.

    George Milonas if you are seeing persistent issues, can you paste some of the errors, including timestamps? If you'd rather not share that publicly here, you can email me at erik@bitbucket.org

  35. Bill Heisler

    This problem appears to be a capacity issue. Added an offset to our scripts so they don't hit exactly on the minute anymore and that resolved the problems for us. It seems like cron scripts are pushing something past connection limits on bitbucket side (server/firewall/...).

  36. Chris Pook

    Hi I started getting these again today at 13:00UTC, possibly related to the database high load from yesterday ?

    ssh_exchange_identification: read: Connection reset by peer
    fatal: Could not read from remote repository.
    
  37. Oliver Schwarz

    We are using bower in our CI environment to fetch other components from their repositories which in the last days very often result in build failures. We experience the same error message:

    Additional error details:
    ssh_exchange_identification: Connection closed by remote host
    fatal: The remote end hung up unexpectedly
    npm ERR! weird error 1
    npm ERR! not ok code 0
    Build step 'Execute shell' marked build as failure
    [...]
    

    If we can help with any more status info or tests, please tell me :) This message was from 12 a.m. European Time.

  38. Erik van Zijst staff

    Looking through my temp logging I can see there was 1 single hickup at 1:25am UTC that lasted less than 2 seconds. I don't see any errors besides that.

    Chris Pook is there any chance you could narrow down the exact timestamps whenever this happens?

  39. Jason Darwin

    Hi Erik, I think I just ran into this issue -- pushing to my bitbucket repo (git@bitbucket.org:jcdarwin/journalsurf-front.git) and received:

    Sun 31 Aug 2014 23:46:39 NZST
    hare:laravel jasondarwin$ git push bitbucket master
    Counting objects: 486, done.
    Delta compression using up to 2 threads.
    Compressing objects: 100% (420/420), done.
    Writing objects: 100% (472/472), 2.01 MiB | 0 bytes/s, done.
    Total 472 (delta 76), reused 0 (delta 0)
    Killed by signal 2.
    
  40. Alexandre Peloquin

    Me too, although it never happened before, its happening right now since about half an hour. Maybe some BitBucket server is under maintenance or is experiencing difficulties?

  41. Hannes Schmidt

    Same here:

    $ ssh -vvv git@bitbucket.org
    OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
    debug1: Reading configuration data /Users/hannes/.ssh/config
    debug1: /Users/hannes/.ssh/config line 9: Applying options for bitbucket.org
    debug1: Reading configuration data /etc/ssh_config
    debug1: /etc/ssh_config line 20: Applying options for *
    debug1: /etc/ssh_config line 53: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to bitbucket.org [131.103.20.167] port 22.
    debug1: Connection established.
    debug1: identity file /Users/hannes/.ssh/id_rsa type -1
    debug1: identity file /Users/hannes/.ssh/id_rsa-cert type -1
    debug1: identity file /Users/hannes/.ssh/id_dsa type -1
    debug1: identity file /Users/hannes/.ssh/id_dsa-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.2
    ssh_exchange_identification: Connection closed by remote host
    
  42. 賜彦 封

    same

    ssh_exchange_identification: Connection closed by remote host fatal: Could not read from remote repository.

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

  43. michael montgomery

    I am also getting this issue ssh_exchange_identification: Connection closed by remote host fatal: Could not read from remote repository.

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

    has never happened before

  44. Junwen Xu

    "ssh_exchange_identification: Connection closed by remote host fatal: Could not read from remote repository.

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

  45. Nik Garkusha

    Been hapenning for an hour.

    Cloning into 'test'...
    ssh_exchange_identification: Connection closed by remote host
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    
  46. Tom King

    same here. tried connecting with ssh -Tvvv to generate more info for Atlassian to debug

    ssh -Tvvv git@bitbucket.org
    OpenSSH_6.6, OpenSSL 1.0.1i 6 Aug 2014
    debug1: Reading configuration data /Users/name/.ssh/config
    debug1: /Users/name/.ssh/config line 5: Applying options for bitbucket.org
    debug1: /Users/name/.ssh/config line 39: Applying options for *
    debug3: ciphers ok: [aes256-cbc,aes256-ctr,aes128-ctr,aes128-cbc,blowfish-cbc]
    debug3: key names ok: [ssh-ed25519,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,ssh-rsa]
    debug3: kex names ok: [diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1]
    debug3: macs ok: [hmac-sha2-512,hmac-ripemd160,hmac-sha2-256]
    debug1: Reading configuration data /usr/local/etc/ssh/ssh_config
    debug1: auto-mux: Trying existing master
    debug1: Control socket "/tmp/ssh_mux_bitbucket.org_22_git" does not exist
    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 "/Users/name/.ssh/bbkey" as a RSA1 public key
    debug1: identity file /Users/name/.ssh/bbkey type 1
    debug1: identity file /Users/name/.ssh/bbkey-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_6.6
    ssh_exchange_identification: Connection closed by remote host
    

    Same key worked earlier today.

    ... and works again now.

  47. Antriksh Sareen

    Vahan your problem is not the same as mine.... i guess... And am a new bie to bitbucket... So may not be able to help you..... I was not able to clone from bitbucket Repository using SSH to which i proceeded with answer suggested by Anadi and now i am able to.... But i face the same error in heroku.... I have setup heroku Successfully. I am able to login and create the app by heroku app, which gets visible in heroku my apps. I am able to add keys, by heroku keys:add but i am not able to push my premade bitbucket repository on heroku and face this error-

    git push heroku master ssh_exchange_identification: Connection closed by remote host fatal: Could not read from remote repository.

    Please make sure you have the correct access rights and the repository exists See if you can help me with this. I am not able to push my app to the heroku repository.I have tried many solutions at stackoverflow and many other sites but nothing worked.

    My .git/config : [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = git@bitbucket.org:sellzie/sellziedevapp.git fetch = +refs/heads/:refs/remotes/origin/ [branch "master"] remote = origin merge = refs/heads/master [remote "heroku"] url = git@heroku.com:whispering-castle-4126.git {Also tried git_heroku } fetch = +refs/heads/:refs/remotes/heroku/

    Host git_heroku {Also tried git@heroku } ProxyCommand corkscrew proxy.usurt.ru 3128 %h %p HostName ssh.heroku.com {Also tried heroku.com } User git IdentityFile "~/.ssh/id_rsa.pub"

  48. Torben Knerr

    Getting it regularly when pulling multiple repos from within a script. It's about 5 Repos that are pulled every 5 Minutes and it fails ~10 times per day.

    Today it happened the first time also on push while our CI server was trying to push a release tag

  49. Andy Randall

    We have been tracking this same issue for the last couple of weeks and I thought I would give some info about what we have observed. When a pull fails, the script doing the pull hangs, or so we thought at first. It hangs around waiting for a response for precisely two hours at which time the script exits and the 'connection reset by peer' error is written to the logs. Using netstat I can see that for successful pulls the connection goes through a series of status's (ESTABLISHED -> SYN_SENT -> TIMED_WAIT). There are probably other status's that fly by that I don't see, but for pulls that fail the connection never goes past ESTABLISHED. Interestingly enough, maybe related, maybe a different issue or maybe not an issue at all, the connection enters the TIMED_WAIT status at the time the script exits and hangs around for another thirty seconds before going away.

    The error written to the logs is usually:

      ssh_exchange_identification: read: Connection reset by peer
      fatal: The remote end hung up unexpectedly
    

    but is occasionally accompanied by:

      fatal: ambiguous argument '..FETCH_HEAD': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions
      fatal: 'FETCH_HEAD' does not point to a commit
    

    We are using Ubuntu 12.04.5 LTS

    Hope this helps.

  50. Jeroen Thora

    I'm getting this error more and more frequently last few weeks. (and almost every evening 16:30 most of our builds fail because of the timeout)

    Fetching changes from the remote Git repository
    Fetching upstream changes from git@bitbucket.org:vendor/repo.git
    ERROR: Timeout after 10 minutes
    

    This is a log line from our automatic builds in jenkins

  51. Steve McCullough

    I can push/pull/fetch fine from my local (OpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 2014), but have been getting timeouts all week from a dev server (OpenSSH_5.3p1 Debian-3ubuntu7.1, OpenSSL 0.9.8k 25 Mar 2009). Might the problem be in the version of the ssh client?

  52. Andy Randall

    Torben Knerr that is interesting. The "ambiguous argument" message seems to accompany the "Connection reset" message approximately on quarter of the time. I have also seen this message:

     ssh_exchange_identification: Connection closed by remote host
     fatal: The remote end hung up unexpectedly
    

    but not nearly as often as the "Connection reset" message and the last time it appeared in the logs was on 10/1. The "Connection reset" message is still happening daily, though.

  53. Heath Malmstrom

    Just FYI, if you are including the port in your git ssh:// connection string then remove it. This cleared up our problems that started yesterday. We had failures doing:

    git ls-remote ssh://git@bitbucket.org:443/company/repository.git HEAD ssh_exchange_identification: Connection closed by remote host fatal: Could not read the remote repository

    Out of the blue from a working state for months. You might want to drop the port out of that connection string and see if it works for you if you're in our boat. Doing just:

    git ls-remote ssh://git@bitbucket.org/company/repository.git HEAD

    came back with expected results. Hopefully will help someone...

  54. Jesse Yowell staff

    Heath,

    If you're going to use SSH with port 443, you'll need to use the altssh URL:

    ssh://git@altssh.bitbucket.org:443/accountname/reponame/

    Also, it may be worth trying using the above link if you're still having issues.. some have reported better performance, but we're still monitoring the original issue when connecting to port 22.

  55. Steve McCullough

    I am still unable to connect on the one server (sadly not under my control) running SSH 5.x. My machines on 6.x connect fine.

    ~/.ssh/config: Host bitbucket.org User git Port 22

    OpenSSH_5.3p1 Debian-3ubuntu7.1, OpenSSL 0.9.8k 25 Mar 2009 debug1: Reading configuration data /home/XXXX/.ssh/config debug1: Applying options for bitbucket.org debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to bitbucket.org [131.103.20.168] port 22. debug1: connect to address 131.103.20.168 port 22: Connection timed out debug1: Connecting to bitbucket.org [131.103.20.167] port 22. debug1: connect to address 131.103.20.167 port 22: Connection timed out

  56. Mmj Jonckheere-Hundhausen

    Often it is caused by a traffic-monitoring router on the ISP's network. Also it may be a faulty NAT implementation. Anyway the cause is the WGET that is using up all bandwidth and at a certain moment in time, traffic gets blocked/lost/Idontknow. Solution is limiting bandwidth with the TC command.

    $ sudo tc qdisc add dev eth0 handle 1: root htb default 11
    $ sudo tc class add dev eth0 parent 1: classid 1:1 htb rate 1kbps
    $ sudo tc class add dev eth0 parent 1:1 classid 1:11 htb rate 1kbps
    

    for a 1 kpbs (gives a 36KiB/s result in git)

    After that : clear all TC rules

    $ sudo tc qdisc del dev eth0 root
    

    Source : Mark S. Kolich - Manually Throttle the Bandwidth of a Linux Network Interface

  57. jeanpierrevg

    Hi, I had CN.NET setup with Bitbucket working perfectly for the past month but since yesterday around 1 PM I have noticed the following error. Nothing has changed on our build machine so I am assuming maybe something is going on in BitBucket? Any help would be great!

    $ git fetch origin ssh_exchange_identification: Connection closed by remote host fatal: Could not read from remote repository.

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

  58. Muchlis Insani

    same error here, just installed Git..

    this happens: fatal: Not a git repository (or any of the parent directories): .git

    when i when i enter $ GIT_CURL_VERBOSE=1 git pull origin

  59. NissimGaber

    I'm trying to push a big library into bit-bucket with mercurial and I received " remote: Connection to bitbucket.org closed by remote host abort: unexpected response: empty string" I work on Linux (Ubuntu 12) and I success to push a small libraries to bit-bucket and I have the problem only with large data SOS

  60. Log in to comment