This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Pushing to 'allowed_push_host' without rubygems.org credentails fails #4437
Labels
Comments
It would be nice to have this addressed. |
It looks like simply moving the linked line down to after the def rubygem_push(path)
allowed_push_host = nil
gem_command = "gem push '#{path}'"
if @gemspec.respond_to?(:metadata)
allowed_push_host = @gemspec.metadata["allowed_push_host"]
gem_command += " --host #{allowed_push_host}" if allowed_push_host
end
unless allowed_push_host || Pathname.new("~/.gem/credentials").expand_path.file?
raise "Your rubygems.org credentials aren't set. Run `gem push` to set them."
end
sh(gem_command)
Bundler.ui.confirm "Pushed #{name} #{version} to #{allowed_push_host ? allowed_push_host : "rubygems.org."}"
end |
@Cohen-Carlisle a PR for that would be 🚀 |
What branch(es?) should a PR addressing this issue be against? |
Master |
homu
added a commit
that referenced
this issue
May 15, 2016
don't error on missing rubygem cred if custom host only raise error asking user to set rubygem credentials during gem push if `allowed_push_host` is not set. Fixes #4437 Apologies if this is a half baked PR. - I looked around to add tests for this, but there is little test coverage over this area I simply wasn't sure how to add a test around this particular change. - I also wasn't sure where to put this in the `CHANGELOG` as the latest entry there is already released.
segiddins
pushed a commit
that referenced
this issue
May 16, 2016
don't error on missing rubygem cred if custom host only raise error asking user to set rubygem credentials during gem push if `allowed_push_host` is not set. Fixes #4437 Apologies if this is a half baked PR. - I looked around to add tests for this, but there is little test coverage over this area I simply wasn't sure how to add a test around this particular change. - I also wasn't sure where to put this in the `CHANGELOG` as the latest entry there is already released.
hsbt
pushed a commit
to rubygems/bundler-graph
that referenced
this issue
Oct 19, 2021
don't error on missing rubygem cred if custom host only raise error asking user to set rubygem credentials during gem push if `allowed_push_host` is not set. Fixes rubygems/bundler#4437 Apologies if this is a half baked PR. - I looked around to add tests for this, but there is little test coverage over this area I simply wasn't sure how to add a test around this particular change. - I also wasn't sure where to put this in the `CHANGELOG` as the latest entry there is already released.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Without a
rubygems_api_key
a gem cannot be published to the host specified by theallowed_push_host
. I was able to verify that with a valid key in~/.gem/credentials
I am able to publish instead to the geminabox server (and it doesn't wind up on rubygems.org). Line is here: https://github.com/bundler/bundler/blob/master/lib/bundler/gem_helper.rb#L95The text was updated successfully, but these errors were encountered: