If you are behind a firewall that blocks port 22 you’ll not be able to access github using the standard procedure described in the Set Up Git help page.
If you are looking for more introductory information on using github and git I recommend you read my other post on Getting started with Git and GitHub.
When trying to login to github over ssh you get this error if you are behind a firewall that block port 22.
$ ssh -vT email@example.com
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to github.com [220.127.116.11] port 22.
debug1: connect to address 18.104.22.168 port 22: Attempt to connect timed out
without establishing a connection
ssh: connect to host github.com port 22: Bad file number
Luckily there is a solution for that: Smart HTTP. Basically it will use HTTP to pull and push updates to github, thus using the standard SSL (443) port instead of using the blocked SSH port (22).
Opting in is pretty easy: when cloning a repo just use the https url instead of the git url, for example:
$ git clone https://firstname.lastname@example.org/Haacked/Subtext.git
If instead of cloning a repository you are creating a new one you have to specify the https instead of the standard git one:
$ git remote add origin https://email@example.com/username/project.git
But it’s not done yet: using SSH the first time you connect to github you get a message asking you to validate the SSH certificate of github. Unfortunately this does not happen when using SSL. The only thing you get is this error message:
$ git push -u origin master
error: SSL certificate problem, verify that the CA cert is OK. Details:
verify failed while accessing https://firstname.lastname@example.org/username/project.git/info/refs
fatal: HTTP request failed
This means that the SSL certificate is not trusted. You could either manually install the certificate or simpler just tell him not to verify the HTTPS certification:
git config --global http.sslVerify false