我试图发布运行此命令的新版本的gem:
rake release --trace
但是这个过程停留在这里:
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
我尝试过但没有工作的事情:
gem update --system
。curl --data-binary @pkg/paperclip_upload-1.2.0.gem -H 'Authorization:XXX' https://rubygems.org/api/v1/gems
POST不起作用,但我可以检索执行GET的宝石。
使用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"))
避免使用执行gem build
然后gem push -v pkg/paperclip_upload-1.2.0.gem
的rake任务,但也被卡住了:
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)
有任何线索吗?
RubyGems’ status page对我来说都是绿色的。
答案 0 :(得分:0)
对我来说,启用2FA on Rubygems.org后,我再也无法运行rake release
。
release:rubygem_push
步骤已挂起。原来是older versions of gem
don't support 2FA,中间版本存在一个错误,该过程是waiting for 2FA code entry but there's no prompt。
对我来说,解决方案是在进程等待时键入2FA代码+ return
。
最终,您应该可以gem update --system
来获得{2}全面支持的gem
的新版本。