美文网首页
git 设置和取消代理

git 设置和取消代理

作者: 陈树树go | 来源:发表于2020-03-23 19:22 被阅读0次

    学习golang,首先需要在 https://golang.org/dl/ 下载安装包,
    如果打不开可以使用这个地址:https://golang.google.cn/dl/

    在开发过程中,需要到github、goole code等网站,下载各种引入包,
    这个时候需要安装git,下载地址为 https://git-scm.com/

    GIt也需要设置,才能正常访问github、goole code等网站,go get 也会调用git

    git代理设置如下(可复制):

    git config --global https.proxy http://127.0.0.1:1080
    git config --global https.proxy https://127.0.0.1:1080
    git config --global http.proxy 'socks5://127.0.0.1:1080'
    git config --global https.proxy 'socks5://127.0.0.1:1080'

    取消git代理设置

    git config --global --unset http.proxy
    git config --global --unset https.proxy

    go mod 使用代理设置:

    go env -w GOPROXY=https://goproxy.cn,direct 

    相关文章

      网友评论

          本文标题:git 设置和取消代理

          本文链接:https://www.haomeiwen.com/subject/locgyhtx.html