I have executed:
$ heroku login
But when I try to push, I\'m still asked for authentication:
$ git push heroku master
Usern
If someone is still struggling with this, this answer helped me a lot Use Heroku API key.
First, as @Raziza O mentioned in a comment, to get heroku API key
https://dashboard.heroku.com/account. Roll down the screen and hit the reveal button.
Then, just run
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:master