My company has a draconian proxy server that prevents me from SSHing to remove servers, and therefore preventing me from using github. I have spent the last day following examples on the web, such as
- How do I use GitHub through harsh proxies?
- http://tachang.tumblr.com/post/22265579539/using-github-through-draconian-proxies-windows-and
But nothing seems to be working. Here is my ~/.ssh/config file:
ProxyCommand /usr/local/bin/corkscrew proxy02.COMPANY_NAME.com 8080 %h %p
Host github.com
User git
Port 22
Hostname github.com
IdentityFile "/Users/msnider/.ssh/id_rsa"
IdentitiesOnly yes
TCPKeepAlive yes
Host ssh.github.com
User git
Port 443
Hostname ssh.github.com
IdentityFile "/Users/msnider/.ssh/id_rsa"
IdentitiesOnly yes
TCPKeepAlive yes
This is the error message I receive when I try to git pull --rebase
:
Proxy could not open connnection to github.com: Forbidden
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I get the same forbidden error when I just try to SSH to github.com, but I can ssh to ssh.github.com if I specify my identity:
ssh -i ~/.ssh/id_rsa git@ssh.github.com
Hi mattsnider! You've successfully authenticated, but GitHub does not provide shell access.
Connection to ssh.github.com closed.
There is no authentication needed to connect to the proxy server.
I have also tried setting the http_proxy
and https_proxy
environment variables:
http_proxy=http://proxy02.COMPANY_NAME.com:8080
https_proxy=http://proxy02.COMPANY_NAME.com:8080
Anyone have an idea as to what I am doing wrong and how I can get this to work? Thanks.