This article begins with some common operations and commands on git that are connected to Gitlab. This article mainly describes how to set up git after a proxy server and how to use the git command. method One: through Http_proxy
Mainly through the http_proxy to ensure the access through the proxy. Can be determined according to the situation is one-time in the terminal or write to the system environment variable settings, if in the intranet and the external network between the frequent operation of the general or directly in the terminal to use better.
Format is: Http_proxy=http://proxyname.xxx.com:port Linux
Git can be done by setting http_proxy into an environment variable.
Export Http_proxy=http://proxyname.xxx.com:port Windows
You can do the same with Windows Git bash . Two: Use Git's command line to pass arguments to
Use the-C command line to set Http.proxy, such as when using the git clone command, in the following format:
git clone-c http.proxy=http://proxyname.xxx.com:port gitlab or GitHub project URL Method III: Git config
If you need global settings, you can use the following methods to set/Cancel /Result Confirmation
git config–global http.proxy http://proxyname.xxx.com:port Confirmation
Git config–global–get http.proxy cancel Setup
git config–global–unset http.proxy summary
This article summarizes several common ways of proxy setup under Git.