How do I configure go command to use a proxy?

后端 未结 7 1658
鱼传尺愫
鱼传尺愫 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 05:47

    This works for me:

    alias go='http_proxy=http://127.0.0.1:1081/ https_proxy=http://127.0.0.1:1081/ no_proxy=localhost,127.0.0.0/8,::1 go'
    

    Note: for someones, protocol may be different https_proxy=http://127.0.0.1:1081

提交回复
热议问题