Pushing to GitHub over 443

I’m working from New York Penn Station today before heading out on the Lake Shore Limited to Michigan. In general this is a positive and productive work environment. My only challenge is that Amtrak WiFi blocks port 22 outbound, so I can’t push my work back to my CI environment on GitHub?

(What am I working on? A Moodle local plugin that exposes the add_instance method of the manual enrollment plugin.)

Happily, GitHub has anticipated this scenario and I don’t have to do anything tricky. I added the following to my local ~/.ssh/config:

1
2
3
4
Host github.com
Hostname ssh.github.com
Port 443
User git

That’s it! All my existing remotes work the same as before, and I’m in business.