Heroku Error: ENOENT: no such file or directory, open 'H:/_netrc'

Viewed 908

Im trying to load a code I wrote onto Heroku but when i tried to do:
heroku git:remote -a [the name of the app on Heroku]
it said this:
Error: ENOENT: no such file or directory, open 'H:/_netrc'

edit:
I tried to do:
Heroku login
And it did the same error.

edit:
I saw someone suggesting to do

  1. cmd>set HomeDrive=c:/users/xxx
  2. run the heroku login
  3. when finished it will create _netrc in directory c:/users/xxx
    But it didn't work for me.

on a side note, from what I read I suppose the _netrc file suppose to save your login information to Heroku? (Heroku username and password) on top of that , Heroku states that using the command : heroku login
will create the _netrc file if not existed yet, but for some reason Heroku doesnt create the file but perhaps only trying to update a missing file which causes the error

2 Answers

I found out after talking to their support that the thing that worked for me is:

set HomeDrive=C:/Users/your Windows username/AppData/Local/heroku

(change the windows username with ur path) and then just do:

heroku login

it will fix it (altho u will have to do that every time u want to use heroku because the problem will keep repeating after you close the cmd)

Had the same issue...turns out there's a typo in the instructions, it should be:

set HomeDrive=c:\users\xxx

Changed the slash directions and it worked for me!

Related