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?