Accessing Git under Authenticated Proxy
My office got proxy and firewall. Therefore, only access to port 80 (HTTP), 23 (FTP), and several ports that opened, but not GIT port (port 9418). To make it worse, it also needs authentication to access the proxy.
Here’s simple way to bypass the proxy, and tunnel the GIT into HTTP port:
# sudo apt-get install corkscrew
Create Authentication File
You need to store your proxy username and password into this file. It’s a simple file with username:password format.
# vi $HOME/authfile myproxyid:mypassword :wq
Create Tunneling Script
This script will be executed by GIT to tunnel the data into HTTP port.
# vi git-proxy.sh #!/bin/sh exec /usr/bin/corkscrew your.proxy.address <proxy_port> $* /your/authfile/location :wq #chmod +x git-proxy.sh
# git config --global core.gitproxy /your/git-proxy.sh