英文:
"go get" git error on all sources but golang.org
问题
以下是翻译好的内容:
go version go1.5.1 windows/amd64
git version 1.9.5.msysgit.1
我一直在尝试获取一些Go库。
当在golang.org上访问时,它们可以正常下载,
但是在github.com或google.golang.org上获取时会出现错误。
当前分支没有跟踪信息。
请指定要合并的分支。
有关详细信息,请参阅git-pull(1)。
英文:
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
得分: 5
从GOPATH中删除该包,并重新获取它。您的包已被修改,git拒绝从上游拉取。
英文:
Delete the package from GOPATH and go get it again. Your package is modified and git is refusing to pull from upstream.
答案2
得分: 0
你试过这个吗?
git branch --set-upstream-to=origin/master master
如果你的分支不是"master",你可以用以下命令确认:
git remote -v
英文:
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
得分: 0
以下是翻译好的内容:
任何可能遇到相同错误的人都可以尝试以下操作:
go get -v -u -x ${包名}
英文:
Anybody who might expirience the same error you could try.
go get -v -u -x ${package name}
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论