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

Running rake release prompts for account information #382

Open
ddoherty03 opened this issue Oct 23, 2023 · 1 comment
Open

Running rake release prompts for account information #382

ddoherty03 opened this issue Oct 23, 2023 · 1 comment

Comments

@ddoherty03
Copy link

I am trying to set up gemstash such that (1) it operates as a cache for rubygems.org and (2) it serves private gems that I want to test without making them public (yet).

For public gems, I just have to run rake release in my source repository and the gem is uploaded to rubygems. For private gems, I want to be able to do the the same thing except that they are only uploaded to gemstash.

In my private gem's gemspec file, I have this setting:

spec.metadata["allowed_push_host"] = "http://localhost:9292/private"

And it looks like that almost does the trick, except that when I run rake release, I get prompted to set up an account on gemstash:

Enter your http://localhost:9292/private credentials.
Don't have an account yet? Create one at http://localhost:9292/private/sign_up
Email:

Is there a setting I should have in the gemspec to set my key, or am I missing something else?

@wollistik
Copy link

@ddoherty03 Gemstash needs a private key for pushing (see https://github.com/rubygems/gemstash/blob/main/docs/gemstash-private-gems.7.md ).

You can specify this for the rake release task by adding the GEM_HOST_API_KEY environment variable like this:

GEM_HOST_API_KEY=the_gemstash_private_key rake release

See also gem help push where this is documented.

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

No branches or pull requests

2 participants