rubygems.org: Cannot gem push (HTTP Basic: Access Denied)

I’m using Ruby 2.0.0-p247 with Gem 2.1.0.

First I curl my credential via:

curl -u JuanitoFatas https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials
Enter host password for user 'JuanitoFatas': *******

I got my :rubygems_api_key. It’s okay. Then I tried to release my gem:

rake release

But it says:

Pushing gem to https://rubygems.org...
Access Denied. Please sign up for an account at http://rubygems.org
/Users/Mac/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/gem_helper.rb:150:in `sh'
/Users/Mac/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/gem_helper.rb:84:in `rubygem_push'
/Users/Mac/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/gem_helper.rb:78:in `release_gem'
/Users/Mac/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/gem_helper.rb:50:in `block in install'

Then I rm my credentials, try to do it manually:

$ gem build mygemname.gemspec
$ gem push mygemname.gemspec
Enter your RubyGems.org credentials.
Don't have an account yet? Create one at https://rubygems.org/sign_up
   Email:   katehuang0320@gmail.com
Password:
HTTP Basic: Access denied.

I checked that I could login on website (https://rubygems.org/) by either using my username or email.

In sum:

My key authentication is failed (Access denied). I have tried reset my key. Also http authentication is also failed (Access denied).

Am I missing something? When I reset my API key, I see there is a flash message said I need to add something to .gemrc but did not know what should I add. Thank you!

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 24 (11 by maintainers)

Most upvoted comments

On windows: I had this issue when using git bash, problem solved when switching to cmd.

@fernandoaleman,I had solved the problem by use another gem name, because there is existing a gem with the same name : (