Why can't I connect or authenticate with the Heroku Command Line (CLI)?

Resolution

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! Enable it by running HEROKU_DEBUG=true HEROKU_DEBUG_HEADERS=1 heroku login on Mac/Linux, or set HEROKU_DEBUG=true; set HEROKU_DEBUG_HEADERS=1; heroku login on Windows.
  • Check which plugins you have installed by running heroku plugins. Some older plugins may have compatibility issues. For example, the heroku-accounts plugin has compatibility issues with 2FA. This plugin is a common cause of the Authentication failed. error. The heroku-two-factor plugin is also deprecated and can cause problems.

If that doesn't help, follow the link below to contact Heroku support.