Git proxy settings

Last night, I found out that bitbucket was out of breath, the push was very slow, and it was impossible to pull at all. I came to verify this morning and found that it was blocked. There are still many projects hosted on it, so I looked for google to solve it. The solution is as follows:

Configure git pull and push to use https protocol, do not use git or ssh protocol;
git config –global –add http.proxy 127.0.0.1:7070 git
config –global –add https.proxy 127.0.0.1:7070
git config –global – add https.sslVerify false
8087 is the local goagent port. It is best to configure sslVerify to false, otherwise there will be a certificate problem.
The above operation can also be replaced by directly modifying the .git/config file and adding the following code:
[http]
proxy = http://127.0.0.1:8087
sslVerify = false
[https]
proxy = http://127.0.0.1:8087
sslVerify = false
then it can be used normally.

Below is socks5 proxy
[http]
proxy=socks5://127.0.0.1:7070
[https]
proxy=socks5://127.0.0.1:7070

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325446015&siteId=291194637
Recommended