I can't git clone https://code.google.com/my-repo, so I want set git through my local client proxy 127.0.0.1:8087. How to config? Thank you.
Asked
Active
Viewed 2,222 times
1
-
"I can't git clone https://code.google.com/my-repo" Why not? – Gerry Oct 02 '11 at 15:18
-
@Gerry: oh,sorry.my-repo is not a real repo,just as an example. – Honghe.Wu Oct 03 '11 at 03:20
-
@Gerry: You can go to my repo:hh-hello-world,just as the name,it is a test case. – Honghe.Wu Oct 03 '11 at 03:28
1 Answers
3
Try setting the https_proxy
environment variable before cloning. For example:
export https_proxy=127.0.0.1:8087
git clone https://wherever/whatever.git
... as suggested in the answer to this question and in the comments on GitHub's announcement of Smart HTTP support.

Community
- 1
- 1

Mark Longair
- 446,582
- 72
- 411
- 327
-
Roughly speaking, if you just do `https_proxy=whatever` that value will only be available in the current shell - the `git clone` command will not have that environment variable set in its environment. If you do `export https_proxy=whatever`, however, that environment variable will also be set in the environment of subsequent commands invoked from the shell. The documentation for `export` in bash can be found [here](http://www.gnu.org/s/bash/manual/bash.html#index-export-115). – Mark Longair Oct 03 '11 at 08:01
-
@HuangheWoo: no problem. Since this answer turned out to be helpful for you, it's conventional on Stack Overflow to accept it by clicking on the tick beside the answer. – Mark Longair Oct 03 '11 at 09:03