How to create an authorization token for remote login for heroku?

Viewed 1091

I am trying to access logs from an app. Apparently, the only way to do that is the herkoku client.

I am working remotely. When I do

heroku login -i 

Error: Your account has MFA enabled; API requests using basic authentication with email and password are not supported. Please generate an authorization token for API access.

But there is no link provided where or how to get such a token.

And the documentation does not mention the creation of such a token. Only how to store it.

Any ideas?

2 Answers

While logged in to the Heroku web interface, go to "Account settings" (in the menu under your avatar in the top right) and scroll down to "API Key". Generate one if there isn't one already, or click "Reveal" to see the existing one.

Now, re-run heroku login -i, and enter your email as normal, but enter that API key instead of your account password.

The above method works. But: You have to type this password into the CLI. Cutting and pasting does not work.

Related