Not able login to Heroku account from command line

Viewed 3812

I am using codio.com . From there I am using ubuntu terminal to log into Heroku but it's giving me below error . I have the read the help page also . It says with MFA you have to use browser for login . But the issue is browser is not opening from Codio platform . I am stuck at this point . Please help .

codio@actor-spoon:~/workspace/helloSaas$ heroku login -i                 
heroku: Enter your login credentials
Email: prashantexploring@gmail.com
Password: ********
 ›   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. 
 ›
 ›   Error ID: vaas_enrolled

Working :) : Just paste API key in place of password .

codio@magic-savage:~/workspace/rottenpotatoes$ heroku login -i
 ›   Warning: heroku update available from 7.45.0 to 7.59.2.
heroku: Enter your login credentials
Email: prashantexploring@gmail.com
Password: ************************************
Logged in as prashantexploring@gmail.com
codio@magic-savage:~/workspace/rottenpotatoes$ 
3 Answers

you can use the "API Key" as the password. enter image description here

There is no way to disable MFA UI_PIC

Go here to browse account setting Scroll down and reveal / re-generate the API-KEY API_KEY

Then login in cli by

heroku login -i

type your email and use API Key as password, you are ready to go

Disable two-factor authentication in your heroku account settings.

You can disable two-factor authentication from the Dashboard account page. You will be asked to supply your password for added security. You can also disable it from the CLI with the following command:

$ heroku 2fa:Disable

This will also ask for your password.

(From here.)

Related