rake release hangs when releasing a gem

血红的双手。 提交于 2019-12-10 15:10:34

问题


I'm trying to release my first gem to Ruby Gems. The gem is working great locally.

I'm releasing it using:

$rake release

Which gives me this in the console:

example_gem 0.0.3 built to pkg/example_gem-0.0.1.gem 
Tagged v0.0.1
Pushed git commits and tags

Then the process hangs. I waited 20 mins, then cancelled.

When I tried to release again I got:

rake aborted!
This tag has already been committed to the repo.

So I assumed the gem had been successfully submitted, however 16 hours later, the gem is not under my account on Ruby Gems.

So I bumped the version and tried again using --trace, but the process hangs in the same place with only the following additions to output:

** Invoke release (first_time)
** Execute release
example_gem 0.0.3 built to pkg/example_gem-0.0.3.gem
Tagged v0.0.3
Pushed git commits and tags

What is going wrong?


回答1:


For the sake of Google searches and archives: I encountered the same issue but for a different reason. When I used the recommended command to download my RubyGems credentials file:

curl -u pond https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials

...I must have mis-typed my password, as the file actually contained the text "HTTP Basic: Access denied.". No error had been output to the console. Repeating the curl command and being more careful with password entry resulted in a sensible credentials file and the next attempt to run rake release worked.

If you get complaints about an existing tag you probably just need to delete it locally; use:

git tag

...to see what's there and once you've identified the version based tag (e.g. "v2.0.0") delete it with:

git tag -d <tag_name>



回答2:


Bumped the version and tried again. This time it worked. Only change I made was to remove Gemfile.lock from git.



来源:https://stackoverflow.com/questions/17464710/rake-release-hangs-when-releasing-a-gem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!