Sotomajor.org.ua - development, photography and a lot of stuff: How to work with github through blocked 22 port

Can not say for sure why it was needed to block 22th port in our company, but github has predicted this trouble and there is easy solution how to work around.

corner icon
Vienna 2010.08.07 Майдан 2010.07.14 Замки під Львовом. Занедбані і не дуже Zacharovana Desna 2010 2010.06.05 Винниченко Володимир - Між двох сил 2010.06.18 Lohika Company Day Lviv at night

How to work with github through blocked 22 port

2010-03-22 09:32 // // Section:

Can not say for sure why it was needed to block 22th port in our company, but github has predicted this trouble and there is easy solution how to work around.

Step one: the problem


mkotsur@mkotsur:~/Documents/techtalks$ git pull origin master
ssh: connect to host github.com port 22: Connection refused
fatal: The remote end hung up unexpectedly

Step two: piece of magic

There is special host ssh.github.com which allows to work with github via port 443. To use it you should add few lines into ~/.ssh/config.


mkotsur@mkotsur:~/.ssh$ cat ./config
Host github.com
User git
Port 443
Hostname ssh.github.com

Step three: magic in action


mkotsur@mkotsur:~/Documents/techtalks$ git pull origin master
From git@github.com:mkotsur/TechTalks
 * branch            master     -> FETCH_HEAD
Already up-to-date.

Add a comment: