I've on my laptop a git repository, and a remote repository on GiHub (a straight forward configuration created when running 'git clone').
I'm using the SSH transfer protocol. i.e. remote address is: [email protected]:MyName/MyProg.git
I'm now in a network environment where port 23 is blocked (As far as I can see, only ports 80 and 443 are open). I need to fetch/merge recent changes available on the server. What are my options? If possible, I'd like to avoid creating a new remote branch with the http protocol (which is basically identical to the remote branch I already have).
You could change url of the origin:
git remote set-url origin https://github.com/MyName/MyProg.git
and work as usual. Then change it back if port unblocked.
Second approach. You could change port which ssh uses by its config. github also provides ssh connection via port 443. For this you need to create a file ~/.ssh/config
with the following content:
Host github.com
Hostname ssh.github.com
Port 443
For debugging you could use ssh -v [email protected]
.
BTW, ssh port is number 22, not 23.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With