`no such name` when attempting to add ruby gem source

被刻印的时光 ゝ 提交于 2019-12-24 10:08:09

问题


I have an artifactory server that is acting as a gem repository.

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/

How can I further troubleshoot this? What is the proper way to add a gem source?


回答1:


To get more information for debugging, pass the --verbose option to the command line.

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

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.



来源:https://stackoverflow.com/questions/56740466/no-such-name-when-attempting-to-add-ruby-gem-source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!