- 更改URL地址
git config --global url."git@xxx.com:".insteadOf "https://xxx.com/"
- 设置私有代理
Linux OS: go env -w GOPRIVATE=xxx.com
Windows OS :设置环境变量 GOPRIVATE=xxx.com
3.gitlab 服务器使用https协议
4.安装crt证书(局域网gitlab)
5. 设置访问token
git config --global http.extraheader "PRIVATE-TOKEN:{{token}}"