使用go get安装github上的项目时一般来说,不可避免会出错。各种错误的处理办法:

必须条件:

1、安装git并配置环境变量。下载地址:http://git-scm.com/

2、安装golang环境,并配置好环境变量。

其它错误:

1、提示 missing Mercurial command

需要下载安装Mercurial软件tortoisehg。地址:mercurial.selenic.com

下载不了?那得自备梯子。

2、提示exec: “git”: executable file not found in %PATH%

git没有安装正确。可能是环境变量没配置好。

3、SSL certificate problem

运行go get前先把认证关掉,在命令行执行:

git config –global http.sslVerify false

4、如果网络连接有问题,需要先准备个梯子,然后在go get命令执行前,先给git设置代理,然后再goget:
git config –global http.proxy “127.0.0.1:8087”
go get …

或者可以在go get的同时指定代理:
http_proxy=127.0.0.1:8087 go get …..

相关文章:

  • 2021-11-22
  • 2021-11-18
  • 2021-12-12
  • 2022-12-23
  • 2021-09-12
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
  • 2021-06-06
  • 2021-08-19
  • 2022-12-23
  • 2021-12-24
相关资源
相似解决方案