Git push makes terminal freeze

When I try git push and git remote show origin my terminal appears to freeze up. After a few minutes or so it finally says:

ssh: connect to host github.com port 22: Operation timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

A timeout while making the SSH connection is most likely caused by some kind of network problem. I can’t see what might be causing it, but if you can reach the GitHub website checking your firewall settings might be a good start.