git set http and https proxy

If the direct connection to git encounters slow speed, or if the company uses a proxy, git needs to set the proxy to clone the remote warehouse

Execute the following two statements

git config --global http.proxy 10.167.32.133:8080
git config --global https.proxy 10.167.32.133:8080

If you need a username and password

git config –global http.proxy http://user:[email protected]:8080
git config –global http.proxy https://user:[email protected]:8080

Then you can use

git clone http://github.com/videolan/vlc-3.0.git

Remove HTTP proxy

git config --system (或 --global 或 --local) --unset http.proxy
git config --system (或 --global 或 --local) --unset https.proxy

The following situation may occur (npm ERR! fatal: unable to connect to github.com), execute the following command to solve

C:\Users\jalchu\WebstormProjects\vue-element-admin>git config --global url."https://".insteadOf git://

Guess you like

Origin blog.csdn.net/qq_41454044/article/details/106792613