Category: OSX

Ubuntu clone with git ‘hung up unexpectedly’ problem solved

I was experiencing a very strange issue where I was unable to clone or pull from some repositories on github. It would only be for some (larger) respositories, and I could sometimes pull them fine using the https:// protocol, but not using the git:// or ssh:// protocols.

What I would see in the output, is that git would contact the remote server, and just hang for several minutes, before giving, rather cryptically, the 'remote end hung up unexpectedly' message. Doing a ‘git pull’ on an existing repo would give me 'error: RPC failed; result=56, HTTP code = 0'

I could clone the same repos fine on my OSX workstation, and on other Ubuntu linux boxes, so something weird was definitely up.

I suspected it was some sort of low-level networking issue, and after trying many things, came upon the solution:

My MTU size was set to ‘automatic’, and had defaulted to 1500. Apparently this can sometimes cause TCP connections to hang in some network environments!

I set my MTU size to 1492 on my network adapter (Under Edit Connections… in the UI) and everything started to work as expected! Huzzah.


Brew: the future of package management on OSX? Hope not.

Warning: This might come off a little ranty.

You know, it might just be that some people need to install older-than-the-bleeding edge versions of software. Some of us have stable production systems, that for whatever reason, don’t always run the latest, nightly-build-sure-it’ll-be-fine-no-really versions of everything.

Turns out to to this using “brew”, you have to go through some quite odd contortions

  1. Install brew (would assume you’ve already done this at least)
  2. brew update (this makes sure you have the /usr/local/.git directory)
  3. brew versions rabbitmq (I’m looking for 1.7.2 of RabbitMQ in this case)
  4. Copy down the git commit hash of the version I want.
  5. git checkout -b temp_branch $GITHASH
  6. brew install rabbitmq
  7. git checkout master
  8. git branch -d temp_branch

Clearly something like ‘brew install rabbitmq –version=1.7.2′ is far too difficult.

Also, what the hell is with brew littering the root of /usr/local with it’s junk? Is there something wrong with something clean like /usr/local/brew?