登录
首页 >  Golang >  Go问答

无法使用 JFrog Artifactory 将 GitHub 私有存储库代理为 Go 注册表

来源:stackoverflow

时间:2024-04-21 08:24:30 316浏览 收藏

在Golang实战开发的过程中,我们经常会遇到一些这样那样的问题,然后要卡好半天,等问题解决了才发现原来一些细节知识点还是没有掌握好。今天golang学习网就整理分享《无法使用 JFrog Artifactory 将 GitHub 私有存储库代理为 Go 注册表》,聊聊,希望可以帮助到正在努力赚钱的你。

问题内容

我想使用 go remote 存储库代理 github。我创建了 go 远程仓库 github 代理 https://github.com/ 并且还创建了一个 go 虚拟存储库。添加的凭据如 https://www.jfrog.com/confluence/display/rtf/go+registry#goregistry-remoterepositories 中所述。

我做了上面链接中解释的所有内容,但是当我尝试获取模块时,我得到了:

go env -w GONOSUMDB="*github.com/xxx/*"
export GOPROXY="https://test:%5Bredacted%[email protected]/artifactory/api/go/go"
go mod download -x
get https://test:%5Bredacted%[email protected]/artifactory/api/go/go/github.com/xxx/platform/@v/v0.21.0.mod
get https://test:%5Bredacted%[email protected]/artifactory/api/go/go/github.com/xxx/platform/@v/v0.21.0.mod: 404 Not Found (0.894s)
go: github.com/xxx/[email protected]: reading https://test:%5Bredacted%[email protected]/artifactory/api/go/go/github.com/xxx/platform/@v/v0.21.0.mod: 404 Not Found

除此之外,我还可以从 github 获取公共模块。身份验证似乎不起作用。


解决方案


您应该升级到 JFrog Artifactory 6.19+ 或 7.4.0+,因为在此之前这是一个缺失的功能 (https://www.jfrog.com/jira/browse/RTFACT-19395)。

以上就是《无法使用 JFrog Artifactory 将 GitHub 私有存储库代理为 Go 注册表》的详细内容,更多关于的资料请关注golang学习网公众号!

声明:本文转载于:stackoverflow 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>