Can't Connect From AWS

I have a virtual machine hosted at AWS which I’ve been using GitHub on for some years but this morning all git commands like push/pull which rely on connecting to GitHub are failing. My last commit was five days ago and none of the settings have changed.

Both of these commands time out from the AWS hosted machines but work fine from my local machine.

ssh -T git@github.com
curl https://github.com/ -I

I’m not sure where to go from here in terms of troubleshooting. I can access other remote machines fine through either ssh or curl so it doesn’t seem to be a general network problem but rather GitHub specific.

# git pull
ssh: connect to host github.com port 22: Connection timed out
fatal: The remote end hung up unexpectedly

I have contacted support as well.

Hi @fletc3her, Welcome to the community! I can confirm we’ve received your support request and a member of our support team will contact you. In the meanwhile would you check your /etc/hosts file on the AWS hosted machines, please? We’ve recently rotated some IP addresses out of our ranges and that could be the reason you are unable to connect.

You can test your connection at this link: https://github-debug.com/

Thank you. It was an old address hard-coded in /etc/hosts.

I think this was an old practice to prevent cluttering the known hosts and prompting for IP addresses to be added when performing git actions.

1 Like

Awesome, I’m glad you could get it going :smile: