Private Ruby Gem Server with Authentication

I want to install a private gbb gem server with some authentication. I want to be able to host my own gems using the Ubuntu public server.

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

Then I read about https://github.com/cwninja/geminabox . But when I use basic authentication (they are in the Wiki), she complains about getting the source from my server.

So. How can I make a private Gem Ruby server with authentication? Is it just not possible?

Thanks.

Edit:

Geminabox problem. I am trying to β€œdelaminate” to set new gems ... but this gives me this error:

AGs-MacBook-Pro: super_app AG $ bundle

Retrieving the source index for http://rubygems.org/

Getting the source index for http: // localhost: 9292 /

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

Could not find aglipsum-0.0.1 in any of the sources

And aglipsum is my own gem. However, when I don't have basic authentication, it works.

+4
source share
5 answers

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

+4
source

Have you tried the source URL prefix with your basic credentials:

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

This works for me with setting apache + passanger.

+2
source

Bundler version 1.6 has added support for HTTP authentication through packet configuration.

+1
source

take a look if my geminabox plug is what you need. I am adding authentication to manage gems.

https://github.com/poshboytl/geminabox

0
source

Expand rubygems private repository

You can easily set up a private rubygems repository from geminabox docker image:

 docker run -d -v /path_where_to_store_gems:/webapps/geminabox/data --name geminabox -p 9292:9292 -P -h geminabox -e PRIVATE=true -e USERNAME=myuser -e PASSWORD=mypassword spoonest/geminabox:latest 

don't forget to change:

  • /path_where_to_store_gems - the path on your local machine where you want to save your gems.
  • myuser - username
  • mypassword - password

It's all. Your repository is available at the URL http: // YOUR_HOST: 9292

Install gems from a private repository

Add the following line at the top of your Gemfile :

 source 'http://myuser: mypassword@YOUR _HOST:9292' 

... and use bundle install as usual.

0
source

All Articles