我只是通过使用go get ./...
“获取”所有必需的库,并且go-get愉快地下载直接从github.com导入的所有库,但是我收到错误:
src/github.com/urfave/cli/altsrc/yaml_file_loader.go:17:2: cannot find package "gopkg.in/yaml.v2" in any of:
/home/ci/.jenkins/tools/org.jenkinsci.plugins.golang.GolangInstallation/Go_1.6/src/gopkg.in/yaml.v2 (from $GOROOT)
/home/ci/.jenkins/jobs/BlenderRender-Client/workspace/src/gopkg.in/yaml.v2 (from $GOPATH)
当然,我可以go get gopkg.in/yaml.v2
它可以工作,但是我正在设置一个CI服务器来自动编译我的项目,我宁愿让go get ./...
只是下载一切而不是抱怨gopkg.in-packets,因为每次需要更改时我都不想重新配置我的CI服务器。
有没有办法告诉go get ./...
可以下载gopkg.in
个数据包?
答案 0 :(得分:0)
Apparently you have issues with get, try go get -v gopkg.in/yaml.v2
and you'll face an error if you have git <=1.7.1
Just upgrade your git client, and problem fixed
You can also solve this by cloning the yaml.v2 repo into :
/home/ci/.jenkins/jobs/BlenderRender-Client/workspace/src/gopkg.in/yaml.v2
run a git clone https://github.com/go-yaml/yaml.git /home/ci/.jenkins/jobs/BlenderRender-Client/workspace/src/gopkg.in/yaml.v2