尝试添加红宝石宝石来源时没有这样的名称

时间:2019-06-24 16:16:33

标签: rubygems artifactory

我有一个人工服务器,它充当gem仓库。

当我尝试更改宝石来源时,出现错误no such name

gem source -a https://artifactory.example.com/api/gems/gems
Error fetching https://artifactory.example.com/api/gems/gems:
    no such name (https://artifactory.example.com/api/gems/specs.4.8.gz)

如果我尝试绕过工件虚拟存储库,而直接指向本地存储库,则会出错

gem source -a https://artifactory.example.com/api/gems/gems-local/
Error fetching https://artifactory.example.com/api/gems/gems-local/:
    bad response Not Found 404 (https://artifactory.example.com/api/gems/gems-local/specs.4.8.gz)

根据工件文档,斜杠确实很重要。我已经在上面的示例中使用了斜杠,也没有使用斜杠。所有结果相同。

/api/gems/gems
/api/gems/gems/
/api/gems/gems-local
/api/gems/gems-local/

如何进一步解决此问题?添加gem来源的正确方法是什么?

1 个答案:

答案 0 :(得分:3)

要获取更多调试信息,请将--verbose选项传递给命令行。

gem source -a https://foo.example.com --verbose

错误no such name并不是对真正问题的描述性答案。我在使用错误的内部SSL证书的人工服务器的前端配置了错误的nginx反向代理。一旦在nginx中修复了证书,就可以正确连接到gem仓库。

相关问题