2

I haven't got what to enter in fields Username for and Password for after the command git push heroku master:

C:\code2015>git push heroku master
Username for 'https://git.heroku.com': nemo
Password for 'https://[email protected]':
remote: !       WARNING:
remote: !       Do not authenticate with username and password using git.
remote: !       Run `heroku login` to update your credentials, then retry        
the git command.
remote: !       See documentation for details:       
https://devcenter.heroku.com/articles/http-git#authentication
fatal: Authentication failed for 'https://git.heroku.com/django-blog.git/'

I have read documents, but do not still understand.

C:\code2015>heroku login
Enter your Heroku credentials.
Email: [email protected]
Password (typing will be hidden):
Authentication successful.
0

5 Answers 5

1

For my situation, I have "identity crises", as I installed git through cygwin, while I used Heroku's toolbelt: heroku login successfully in DOS Command console (CMD).

For CMD, the %HOME% is c:\Users\my-id

for cygwin, $HOME is different

I found that _netrc was placed in both $HOME and %HOME%

I had to

copy $HOME/_netrc $HOME/.netrc then

git push heroku master

succeeded.

1
  • I did cp $HOME/_netrc $HOME/.netrc and worked perfectly in cygwin.
    – Ian Link
    Jun 17, 2016 at 14:56
1

Just to be more definite.

This works for me on Windows 8.
In cmd do:

set HOME=%USERPROFILE%
0

this happens because the home folder isn't the same with the toolbelt and git when finding the _netrc. Can you show me the output of each of the following?

echo %HOME%
echo %HOMEDRIVE%%HOMEPATH%
echo %USERPROFILE%
echo %HOMESHARE%

then you'll need to find out where the _netrc file is, copy it into one of the paths above and find out which is the correct location. Let me know which is the correct one for you.

4
  • my all paths are ok (c:/user/me) and there is _netrc created, but somehow GIT doesn't read it ?
    – razor
    Apr 15, 2015 at 13:24
  • git is looking in a different place for it. I'm not sure how to find out, check each of your env vars with set Apr 17, 2015 at 17:36
  • it looks like GIT wants to use %HOME% variable. which is not set under Windows. I set %HOME% to the same value as USERPROFILE (the place where _netrc exists)
    – razor
    Apr 18, 2015 at 18:01
  • %HOME% generally isn't set, if it were, everything would work. I want to know what git is using as a fallback when %HOME% isn't set. Apr 20, 2015 at 14:57
0

I had similar problem,

heroku login

was saving _netrc file at my user directory ( %USERPROFILE%, the same as %HOMEDRIVE%%HOMEPATH% ) but GIT didn't use that (it looks like it reads only %HOME% variable). I set

%HOME% 

variable to the same value (so it is c:\user\<my account>\ now and there is also _netrc file) and GIT started to work

-1

To have ability to push to heroku git repository you have to login with heroku gem

heroku login

and then you can use regular git commands. Just try again

heroku login
git push heroku master
1
  • yes, it's obvious, but it's just don't work, that there is a question what to do
    – razor
    Apr 20, 2015 at 12:42

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.