Cli: [Question] How can I login to Heroku without inputting email and password

Created on 16 Jun 2017  路  6Comments  路  Source: heroku/cli

I am working on the project in which I intend to log in to Heroku CLI without inputting the email and password. I read that heroku login <<< $"$USERNAME\n$PASSWORD\n" no longer works.
What are the alternatives?

Most helpful comment

do this to create a token, then set the HEROKU_API_KEY env var to that token

All 6 comments

easiest way is to set HEROKU_API_KEY to an oauth key

Can you please elaborate it, or maybe give a link to a resource for this? having a really hard time with this

do this to create a token, then set the HEROKU_API_KEY env var to that token

Thank you for the reply.

I followed what you mentioned. Commands like heroku apps seem to work, but when i run git push heroku master, i get the following in my console

image

What am I supposed to do to avoid this, and automatically push to heroku?

git doesn't use the api key so that won't work. You'll either have to manually create a netrc file with the api key or use ssh git

i used the Platform API and it did the work. Thank you for your help. Appreciate your time

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DennisTsiang picture DennisTsiang  路  7Comments

edmorley picture edmorley  路  3Comments

sf-jd picture sf-jd  路  5Comments

omarcostahamido picture omarcostahamido  路  4Comments

zeke picture zeke  路  7Comments