The git pull/push command can be instructed to access remote server via proxy by setting https_proxy environment variable. So, we can run commands below use proxy.
https_proxy=http://127.0.0.1:8087 git pull
But we may get below error because the goagent ssl certificate can't be verified.
export https_proxy=http://127.0.0.1:8087 git push
To resolve this problem, we can force git not to verify ssl ceritificate by setting GIT_SSL_NO_VERIFY environment variable.
error: SSL certificate problem: unable to get local issuer certificate while accessing https://github.com/xxxxxxxxxxx fatal: HTTP request failed
To make these settings perminately for a git project or globally. We can write them to git config file.
export GIT_SSL_NO_VERIFY=true git pull
The resulting .git/config file is like this:
git config http.proxy http://127.0.0.1:8087 git config http.sslVerify false
BTW, there is a rumour that Fang BingXing gets ill badly recently. Wish Death can conquer him as soon as possible, amen.
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true [remote "origin"] url = https://github.com/rxwen/my_posts.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master [http] proxy = http://127.0.0.1:8087 sslVerify = false