How do I configure go command to use a proxy?

后端 未结 7 1676
鱼传尺愫
鱼传尺愫 2020-12-02 05:34

I want to run go install to install the tour, but I can\'t find the option to use a proxy for internet access. I don\'t need this just for the tour but for deve

相关标签:
7条回答
  • 2020-12-02 06:01

    On Windows command line:

    set http_proxy=http://[user]:[pass]@[proxy_ip]:[proxy_port]/ set https_proxy=http://[user]:[pass]@[proxy_ip]:[proxy_port]/

    ...then navigate to https://github.com/ and download the GitHub certificate (I set the name as goland_cert.cer)

    ...now execute the OpenSSL command to export this to PEM format

    openssl x509 -inform der -in goland_cert.cer -out goland_cert.pem

    ...finally set the certificate in git global config

    git config --global http.sslCAInfo C:/Users/[User]/certs/golang_cert.pem

    0 讨论(0)
提交回复
热议问题