Pushing to github over public wifi

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
  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.