Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authentication failure in Heroku CLI after password change

After a password change on heroku's website, I can't access the heroku api.

When I do heroku login, I get Authentication successful, even though it shouldn't because the password has changed. It doesn't even ask for my email or password, like it should!

If I try heroku apps (or any other application related command), I get Authentication failure.

If I try heroku status, it works.

I don't have any plugins installed.

Logs:

$ heroku version
heroku-gem/3.6.0 (i686-linux) ruby/2.1.0
$ heroku logout
Local credentials cleared.
$ heroku login
Authentication successful.
$ heroku apps
Authentication failure
$ heroku plugins
You have no installed plugins.

I'll appreciate any help or ideas I can get. I already opened a ticket and waiting for the Heroku Support to get back to me.

Thanks

like image 835
yoavmatchulsky Avatar asked Apr 09 '14 09:04

yoavmatchulsky


People also ask

Why heroku CLI is not working?

If you're having issues with the CLI, ensure that you're using the latest version. If you're not, try updating with heroku update . Not all methods of installation support heroku update . If you installed the CLI with apt , you must use sudo apt-get update && sudo apt-get upgrade heroku .

Why heroku login is not working?

You can try several things to fix this: Verify that you're on the latest version of the Heroku Command Line by running heroku update . Enable debugging during login. Make sure to redact your password from the output before sending it to support!

How do I change my heroku password?

Enter your email address below and we'll send you a link to reset your password. if you need additional assistance.


2 Answers

Apparently, changing the password for heroku regenerates a new API key, and I had the wrong HEROKU_API_KEY configured. (It regenerates a new one after password change).

I'm posting here the response from the great Heroku's support team, which gave me these suggestions:

  • Is there a ~/.netrc file on your computer? If there is, can you please check if the file contains something Heroku related things? Please remove if there is, and try login again.
  • Is there an HEROKU_API_KEY environment variable defined on your machine? If yes, could you remove it and login try again?
  • Is there a ~/.heroku/credentials file (with or without an extension) on your machine? If yes, could you remove it and try login again?
  • Finally, if none of those work, could try the following command: GEM_HOME='' BUNDLE_GEMFILE='' GEM_PATH='' RUBYOPT='' heroku login and see how it goes?
like image 72
yoavmatchulsky Avatar answered Oct 02 '22 07:10

yoavmatchulsky


heroku accounts:remove personal or whatever account name you have

git config --unset heroku.account

heroku accounts:add personal then login

like image 39
bcackerman Avatar answered Oct 02 '22 07:10

bcackerman