尝试添加红宝石宝石来源时没有此名称 [英] `no such name` when attempting to add ruby gem source
问题描述
我有一个人工服务器,它充当gem仓库.
I have an artifactory server that is acting as a gem repository.
当我尝试更改宝石来源时,出现错误no such name
When I try and change the gem sources, I get error 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)
如果我尝试绕过工件虚拟存储库,而直接指向本地存储库,则会出错
If I try and bypass the artifactory virtual repository, and point straight at the local repository I get error
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)
根据工件文档,斜杠确实很重要.我已经在上面的示例中使用了斜杠,也没有使用斜杠.全部具有相同的结果.
According to the artifactory documentation, the trailing slash does matter. I've tried the above examples with and without trailing slashes. All with the same result.
/api/gems/gems
/api/gems/gems/
/api/gems/gems-local
/api/gems/gems-local/
如何进一步解决此问题?添加gem来源的正确方法是什么?
How can I further troubleshoot this? What is the proper way to add a gem source?
推荐答案
要获取更多调试信息,请将--verbose
选项传递到命令行.
To get more information for debugging, pass the --verbose
option to the command line.
gem source -a https://foo.example.com --verbose
错误no such name
并不是对真正问题的描述性答案.我在使用错误的内部SSL证书的人工服务器的前端配置了错误的nginx反向代理.一旦我在nginx中修复了证书,就可以正确连接到gem仓库.
The error no such name
is not a descriptive answer for the true problem. I had a misconfigured nginx reverse proxy infront of the artifactory server that was using the wrong internal SSL certificate. As soon as I fixed the certificate in nginx, I was able to connect to the gem repository properly.
这篇关于尝试添加红宝石宝石来源时没有此名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!