Create ~/.ssh/config (notepad %home%\.ssh\config)
ProxyCommand "C:\Program Files\Git\bin\connect.exe" -H <proxy-server>:<proxy-http-port> %h %p
Host 127.0.0.1
HostName 127.0.0.1
User <username>
Host github.com
User git
Port 22
Hostname github.com
IdentityFile "C:\users\<username>\.ssh\id_rsa"
TCPKeepAlive yes
IdentitiesOnly yes
Host ssh.github.com
User git
Port 443
Hostname ssh.github.com
IdentityFile "C:\users\<username>\.ssh\id_rsa"
TCPKeepAlive yes
IdentitiesOnly yes
Msysgit includes connect.exe, so you do not need to download and compile connect. A precompiled exe is also available here.
Now ssh github.com should work
Note that if you want to connect via a socks5 proxy, then change -H to -S.
ProxyCommand connect -S <proxy-server>:<proxy-socket-port> %h %p