“go get” git error on all sources but golang.org

ぐ巨炮叔叔 提交于 2021-02-05 06:40:11

问题


go version go1.5.1 windows/amd64 git version 1.9.5.msysgit.1

I have been trying to get some Go libraries. They are downloaded fine, when accessed on golang.org but github.com or google.golang.org packages give an error.

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details


回答1:


Delete the package from GOPATH and go get it again. Your package is modified and git is refusing to pull from upstream.




回答2:


Have you tried this?

git branch --set-upstream-to=origin/master master

In case your branch is different than "master" you can confirm it with:

git remote -v



回答3:


Anybody who might expirience the same error you could try. go get -v -u -x ${package name}



来源:https://stackoverflow.com/questions/33064343/go-get-git-error-on-all-sources-but-golang-org

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!