Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'git push heroku master' is still asking for authentication

I have executed:

$ heroku login 

But when I try to push, I'm still asked for authentication:

$ git push heroku master Username for 'https://git.heroku.com': <email> Password for 'https://<email>@git.heroku.com': 

Then I get a WARNING: Do not authenticate with username and password using Git.

I ran heroku login again and authenticated successfully but I still get the same failure.

I've checked the remote:

$ git remote -v heroku https://[email protected]/appname.git (fetch) heroku https://[email protected]/appname.git (push) 

I've also generated a new public key, passed it to Heroku, and validated it: https://devcenter.heroku.com/articles/keys

I am on Windows 8, with Git 1.9.5.

like image 916
Rea G Avatar asked Jan 07 '15 02:01

Rea G


People also ask

How do I force push to Heroku?

To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.


2 Answers

I got around this by logging in with the following :

username : email used to register to heroku (Also been able to leave this field blank)

password : heroku auth token (API Key)

where the auth token can be retrieved by $ heroku auth:token or via the Account Settings in Heroku

like image 83
andy mccullough Avatar answered Oct 06 '22 14:10

andy mccullough


I had the same problem (git couldn't authenticate). It happend that GIT wants to read auth data from %HOME%/_netrc file and on Windows you don't have this variable (only %USERPROFILE% and %HOMEDRIVE% + %HOMEPATH%)

i set HOME to %USERPROFILE% (the place where heroku saved _netrc file) and GIT started working

like image 33
razor Avatar answered Oct 06 '22 12:10

razor