去建立找不到修订 [英] go build can't find a revision

查看:83
本文介绍了去建立找不到修订的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在计算机A上开发了一个存储库,并创建了一个我签入的go.mod/go.sum.

I developed a repo on computer A and created a go.mod/go.sum that I checked in.

我使用计算机B上的go.mod/go.sum文件提取该存储库,但是当我尝试构建程序时,无法满足模块约束条件.

I pull that repo with the go.mod/go.sum files on computer B, but when I try to build the program, the module constraints can't be satisfied.

$ go build
go: finding github.ibm.com/kms/key-protect-client v0.1.5
go: finding golang.org/x/tools v0.0.0-20180221164845-07fd8470d635
go: github.ibm.com/kms/key-protect-client@v0.1.5: unknown revision v0.1.5
go: error loading module requirements

失败的存储库是私有存储库,由于某种原因,它没有下载到模块缓存中.在另一台计算机上,将下载依赖项,并且构建成功.我正在同一域中构建另一个私有存储库,因此我知道我的github凭据使我可以访问这些存储库.但是由于某些原因,go模块系统无法到达相关的存储库.

The repo that is failing is a private repo, and for some reason it doesn't get downloaded to the module cache. On another computer, the dependencies are downloaded and the build succeeds. I am building another private repo in that same domain, so I know that my github credentials give me access to these repos. But for some reason, the go module system can't get to the dependent repo.

我找不到更多有关如何调试它的信息.

I cannot find more information how to debug this.

推荐答案

问题与cmd/go不相关,不知道git身份,并假设.gitconfig文件中仅阐明了一个.

Problem is related to cmd/go not being aware of git identities and assuming there is only one articulated in the .gitconfig file.

解决方法:当您需要使用一组git身份来替换全局.gitconfig时,准备使用该git身份并且正在使用可更新模块文件的cmd/go工具.

Work-around: have a set of git identities ready to replace global .gitconfig when you need to work with that git identity and are dealing with cmd/go tools that update the module file.

这篇关于去建立找不到修订的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆