How to set up a proxy for Git?
巴扎黑
巴扎黑 2017-05-02 09:33:57
0
12
1959

Recently, I can’t access Bitbucket frequently, and the speed of dragging code from Github is slow. Everyone knows the reason.
Therefore, the best way is to set up a proxy for Git. I hope to specify some warehouses to use the proxy method. I don’t know how to set it up?

To add another situation

In the local environment, I set up an ssh agent and go to 127.0.0.1:7070 through SOCKS. If the local ssh agent is turned on, Is there another way?

巴扎黑
巴扎黑

reply all(12)
Peter_Zhu

I think you may be asking this question.

Question:
E:PDFium>git clone https://pdfium.googlesource.com/pdfium
Cloning into 'pdfium'...
fatal: unable to access 'https://pdfium.googlesource.com/pdfium/' : Failed connect to pdfium.googlesource.com:443; No error

Solution:
git config --global http.proxy http://proxy.com:1234

git config --global https.proxy http://proxy.com:1234
git config --global http.sslverify false
Reposted from: http://ricksu.blog.163.com/blog/static/18906433820125294929508/

Reference: http://infong.net/config-proxy-for-git/

I use a small software on my computer to circumvent the firewall, so I set it to

E:PDFium>git config --global http.proxy http://127.0.0.1:8580
E:PDFium>git config --global https.proxy https://127.0.0.1:8580
E:PDFium>git config

--global http.SSLVERIFY false

phpcn_u1582

On ubuntu 16.04 it can still look like this:

In a terminal type:

export all_proxy=socks://addr:port
export ALL_PROXY=socks://addr:port

Then all git operations performed on this terminal will go through the proxy

If you want to cancel:

unset all_proxy
unset ALL_PROXY
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template