GIT is becoming very popular as SCM due to its simplicity and flexibity.
Often software developers encounter proxy issue when the server sit behind firewall.
There are three protocols git can use to clone a repository: http, git and ssh.
GIT clone example:
git clone http://git.denx.de/u-boot.git
git clone git://git.denx.de/u-boot.git
git clone ssh://git@github.com/weweng/blog.git
In this post, I explain how to set up proxy for each protocol using proxy.esl.cisco.com as example.
HTTP
There are two approaches: env variable and git config
set http_proxy enviroment variable
or
git config
then it works as following:
git clone http://git.denx.de/u-boot.git
GIT
First install corkscrew using apt-get (since I’m running ubuntu)
sudo apt-get install corkscrew
Second, create a bash script named as “git-proxy”
Finally, it works as following:
git clone git://git.denx.de/u-boot.git
SSH
This is most complicated scenario. I use github.com as example.
Step#1 create an entry in ~/.ssh/config like below:
Step#2 Generate RSA key and add into github.com
Please take the steps from https://help.github.com/articles/generating-ssh-keys/
Add above key into your guthub.com account, after that, then we should see following: