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://git@heroku.com/appname.git (fetch)
heroku https://git@heroku.com/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.
I have exactly the same problem. The reason in my case, I used accidentally window console instead of Git bash
This topic is old, I know.
However, none of the previous solutions worked for me.
My problem was that "Windows Credentials" (os: Windows 10) had another credential previously associated with Heroku (company account) and used this instead of the new one (my personal account).
I had to go to: "Control Panel\All Control Panel Items\Credential Manager" (from Control Panel), and modify all the credentials: https://git.heroku.com (and all those associated with "heroku" word) with the account current.
However, the password I placed the Key API that is displayed in "Dashboard" of the site and the command works: git push heroku master.
7 hours that life will not give me back. :/
My 2 cents.
From the Heroku documentation
Enter the following commands:
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
First find the
_netrc
file that is created by heroku. In windows it can be found inC:\Users\User Name\_netrc
.That file contains credentials for
git.heroku.com
Use that login and password when ask for authentication after
$ git push heroku master
commandIf anybody else is trying to solve this on cygwin: http://www.railszilla.com/git-push-heroku-master-authentication/start rewriting to SSH transport did the trick for me: