There is a point to this story, but it has temporarily escaped my mind...
Contact Me MyFaceBook MyLinkedIn MyGitHub MyTwitter

Access GitHub From Behind a Firewall

I work in a pretty restrictive network that blocks port 22 (SSH) outside of the corporate network. So I usually do all of my work locally, committing my changes during the day, then push my commits when I go home in the evenings. A few times, this has presented issues when other people were waiting on a change that I had finished but was unable to push out… I recently discovered that GitHub also listens on port 443 for SSH traffic. This is significant because port 443 is used for SSL and firewalls can't “filter” traffic on this port due to the “man-in-the-middle” preventions that are present in SSL. There are some firewalls that can “filter” SSL because they place a certificate in the Trusted Certificate Authority Store on the local computer and then “issue” certificates on the fly for URL while connecting to the remote site and using the “official” certificate in the background… Luckily, my corporate firewall doesn't filter SSL for now…

In order to push to GitHub using port 443, you need to add ssh.github.com to your SSH configuration,

~/.ssh/config
host github.com
  hostname ssh.github.com
  IdentityFile ~/.ssh/id_rsa
  Port 443

That allows me to pull and push using the SSH configuration from GitHub.

jeast@computer:~/projects/mygithub
(master)$ git push
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 339 bytes, done.
Total 2 (delta 0), reused 0 (delta 0)
To git@github.com:dcjulian29/dcjulian29.git
   58836c6..a2ce5ac  master -> master
jeast@computer:~/projects/mygithub
(master)$ 
Copyright © 2022 by Julian Easterling. SOME RIGHTS RESERVED.
Privacy Policy              Terms of Use             


Creative Commons License
Except where otherwise noted, content on this site is
licensed under a Creative Common Attribution-Share Alike 4.0 International License.


All of the opinions expressed on this website are those of Julian Easterling and
do not represent the views of any of my current and previous clients or employers in any way.

If you notice an error on the site or content that has not been properly attributed, bring
it to my attention using the contact page and I will endeavor to fix it as soon as I can.

I accept no responsibility or liability for any damages incurred by following any of
my advice or by using any of the information on my site or of those sites that I link to.