Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Private Ruby Gem Server with Authentication

I want to install a private Ruby gem server with some authentication. I want to be able to host in-house gems using a public Ubuntu server.

I read about http://docs.rubygems.org/read/chapter/18. But there is no authentication with that one - as I can see.

Then I read about https://github.com/cwninja/geminabox. But when I use the basic authentication (they have in their Wiki), it complaints about fetching the sources from my server.

So. How can I make a private Ruby gem server with authentication? Is that just impossible?

Thanks.

Edit:

Geminabox problem. I try to "bundle" to install new gems... but it gives me this error:

AGs-MacBook-Pro:super_app AG$ bundle

Fetching source index for http:// rubygems.org/

Fetching source index for http:// localhost:9292/

Could not reach rubygems repository http:// rubygems.org/, http:// localhost:9292/

Could not find aglipsum-0.0.1 in any of the sources

And "aglipsum" is my custom gem. However when I do not have basic authentication on, it works.

like image 728
Alexander Avatar asked Apr 15 '11 13:04

Alexander


3 Answers

Some professional binary repository managers, such as Artifactory, support private RubyGems repositories.

like image 125
zapp Avatar answered Oct 21 '22 18:10

zapp


Have you tried prefixing the source url with your basic auth credentials:

gem sources -a http://user:password@localhost:9292

This works for me with an apache + passanger setup.

like image 29
tfischbach Avatar answered Oct 21 '22 16:10

tfischbach


Bundler version 1.6 added support for HTTP auth via bundle config.

like image 1
vasilakisfil Avatar answered Oct 21 '22 17:10

vasilakisfil