登录
首页 >  Golang >  Go问答

出现 GOPROXY 与 JFrog Artifactory 集成时的 404 Not Found 错误

来源:stackoverflow

时间:2024-03-26 11:03:33 348浏览 收藏

使用 JFrog Artifactory 6.6.1 集成 GOPROXY 时,尝试通过 go get 检索 Go 模块时,会出现 404 Not Found 错误。问题发生在使用 jfrog rt gp 上传的 go 存储库中,而环境变量 goproxy 已设置为 Artifactory 提供的值。在 Artifactory 升级到 6.8.2 后,该问题已得到解决,go get 调用能够正常工作。

问题内容

artifactory 中使用了一个名为 go-feature 的 go 存储库。 go 模块已使用 jfrog rt gp 上传。环境变量 goproxy 设置为 artifactory 在“set me up”窗口中提供的值。所有 go get 调用都会失败并显示 404。artifactory 版本为 6.6.1

$ go get -v speechmatics.com/[email protected]
go: finding speechmatics.com/cockroachdbingestor v1.0.1
go: speechmatics.com/[email protected]: unexpected status (http://user:token@fake_artifactory_url.com/speechmatics/api/go/go-feature/speechmatics.com/cockroachdbingestor/@v/v1.0.1.info): 404 Not Found
go: error loading module requirements

speechmatics/cockroachdbingestor 模块存在于 artifactory 的 1.0.1 版本中。可以在网络浏览器中看到。

预计 go get 会起作用。

针对 url 手动运行 curl 也会返回 404。返回 artifactory 标头,以便到服务器的路由有效。


解决方案


升级到 6.8.2 go get 后可以工作。

本篇关于《出现 GOPROXY 与 JFrog Artifactory 集成时的 404 Not Found 错误》的介绍就到此结束啦,但是学无止境,想要了解学习更多关于Golang的相关知识,请关注golang学习网公众号!

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