I’ve been pushing to my github repo over public wifi for a while now. However, a recent change to the wifi’s firewall prevented me from pushing to github. I received an error that said:
$ git push origin master ssh: connect to host github.com port 22: Connection refused fatal: The remote end hung up unexpectedly
Through the github help pages, I found a page (https://github.com/blog/642-smart-http-support) that described how to clone a repo so that it used HTTP instead of SSH. If you use git version 1.6.6 or later and you clone a repo using the HTTP path instead of the SSH path, git will use HTTP to push changes.
Since I already had a clone of my repo, I just needed to change my git local config to use the HTTP URL.
$ git config --local -e
Change
url = git@github.com:pboone/uCORE.git
to
url = https://pboone@github.com/pboone/uCORE.git