Unable to use github ssh for anything (pull/clone/push etc) #54558
-
Select Topic AreaGeneral BodyI have setup ssh in my local machine & in my github account setting. But when I try to do anything(fetch/pull/push/clone), it always gives this response: I thought if there was any issue for my device to connect with the ssh server I'm not sure if there's any issue on my end, or from the server itself(which is very unlikely), I regenerated the ssh key and added the new key to my github account. But the problem still persists. Any idea what should I do? UPDTE: The problem seems to be in my specific ISP for some reason. Switching to a different Wi-Fi worked. Also, port |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
|
Timeout means it's definitely not a problem with your key. Most likely it means a misconfigured firewall somewhere that drops your packets, or maybe a router that sends them in a very wrong direction. Things to try (other than checking your firewall settings):
|
Beta Was this translation helpful? Give feedback.
-
|
@airtower-luna Also, another important discovery on this whole thing, it works fine when I switch my Wi-Fi networkI have no idea why my ISP would restrict connecting to github's ssh server, though |
Beta Was this translation helpful? Give feedback.
-
Yeah, that sounds a lot like a network issue. I can't say if they restrict that intentionally or if it's a bug, but sending a complaint/bug report is probably a good idea. I'm afraid other than that the options you have are to use another network, or try to work around the problem (e.g. using SSH over the HTTPS port as mentioned above, using Git over HTTPS, or using a VPN). |
Beta Was this translation helpful? Give feedback.
You are already using SSH, which usually uses TCP port 22. Networks that do weird blocks usually still allow TCP port 443, which is the default port for HTTPS. Because of that GitHub offers an SSH server that listens on
ssh.github.comTCP port 443, which gets around simple port blocks (a more sophisticated block might notice the protocol is SSH, not TLS). 😉See Use SSH over HTTPS port in the documentation. Though I'd suggest using
url.<base>.insteadOfsetting instead of overriding the connection forgithub.comin~/.ssh/config(that's what the documentation describes), like so:The resulting entry in your
~…