I'm trying to release a new version of my gem running this command:
rake release --trace
but the process is stuck here:
rake release --trace
** Invoke load_app (first_time)
** Execute load_app
** Invoke release (first_time)
** Invoke build (first_time)
** Execute build
paperclip_upload 1.2.0 built to pkg/paperclip_upload-1.2.0.gem.
** Invoke release:guard_clean (first_time)
** Execute release:guard_clean
** Invoke release:source_control_push (first_time)
** Execute release:source_control_push
Tag v1.2.0 has already been created.
** Invoke release:rubygem_push (first_time)
** Execute release:rubygem_push
Things I tried and didn't work:
gem update --system
.curl --data-binary @pkg/paperclip_upload-1.2.0.gem -H 'Authorization:XXX' https://rubygems.org/api/v1/gems
The POST is not working but I can retrieve my gems performing a GET.
Use gems
require 'rubygems'
require 'gems'
Gems.configure do |config|
config.username = 'xxx'
config.password = 'xxx'
end
Gems.push(File.new("pkg/paperclip_upload-1.2.0.gem"))
Avoid to use the rake task executing gem build
and then gem push -v pkg/paperclip_upload-1.2.0.gem
but is stuck too:
gem push -v pkg/paperclip_upload-1.2.0.gem
GET https://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz
304 Not Modified
GET http://rubygems.org/latest_specs.4.8.gz
302 Moved Temporarily
GET http://production.s3.rubygems.org/latest_specs.4.8.gz
200 OK
GET http://rubygems.org/quick/Marshal.4.8/rubygems-update-2.4.8.gemspec.rz
302 Moved Temporarily
GET http://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/rubygems-update-2.4.8.gemspec.rz
200 OK
Pushing gem to http://rubygems.org/...
POST http://rubygems.org//api/v1/gems
connection reset after 1 requests, retrying
POST http://rubygems.org//api/v1/gems
connection reset after 1 requests, retrying
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
too many connection resets (http://rubygems.org//api/v1/gems)
Any clue?
RubyGems’ status page is all green for me.
For me, after enabling 2FA on Rubygems.org I wasn't able to run rake release
any more.
The release:rubygem_push
step was hanging. Turns out older versions of gem
don't support 2FA, and intermediate versions had a bug where the process is waiting for 2FA code entry but there's no prompt.
The solution for me was to type in a 2FA code + return
when the process was waiting.
Eventually you should be able to gem update --system
to get a new version of gem
with full 2FA support.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With