Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gemstash always redirects to rubygems.org #154

Open
lukebigum opened this issue Aug 2, 2017 · 3 comments
Open

Gemstash always redirects to rubygems.org #154

lukebigum opened this issue Aug 2, 2017 · 3 comments

Comments

@lukebigum
Copy link

Hello,

Is it possible to use Gemstash as a proxy? When I invoke gem install from a server that can't reach the internet, the server requests /latest_specs.4.8.gz to which Gemstash returns a 302 redirect rather than attempting to fetch the file itself:

[2017-08-02 16:24:11 +0000] - INFO - 1.1.1.1 - - [02/Aug/2017:16:24:11 +0000] "GET /latest_specs.4.8.gz HTTP/1.1" 302 - 0.0011

Is this the correct behaviour? I was hoping to use Gemstash to install Gems for servers behind a firewall.

@jasonwbarnett
Copy link

jasonwbarnett commented Dec 3, 2017

I have the same question. I would like to configure gemstash as a source for rubygems, e.g.

gem sources -a http://localhost:9292
gem sources -r https://rubygems.org/
gem install nokogiri

@indirect
Copy link
Member

indirect commented Dec 3, 2017

Gemstash was originally created as a proxy for Bundler, so as of today it only proxies requests for the Bundler API. It does a small amount of caching, but it does not (yet) support fully-offline operation. Pull requests to add that would be welcome!

@talhajilal
Copy link

Can we run ruby gem on a server running behind the firewall, and rubygem.org is only accessible from proxy?

How can I tell gemstash to connect rubygem.org with http_proxy?
I have tried with http_proxy in .gemrc and also set https_proxy="proxy.com" and http_proxy="proxy.com" but still getting error 302.

Any suggestion ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants