5

I have installed Heroku CLI on Windows,

Facing below failure while logging in:

Error: ENOENT: no such file or directory, open 'H:/_netrc'
heroku/7.41.1 win32-x64 node-v12.16.2

C:\Windows\system32>heroku login
heroku: Press any key to open up the browser to login or q to exit:
Opening browser to https://cli-auth.heroku.com/auth/cli/browser/2785a37e-18ec-43f0-a686-89cc597d2443
Logging in... done
Error: ENOENT: no such file or directory, open 'H:/_netrc'

C:\Windows\system32>```

Please help me with this.
Thanks,
Sagar                                                                                                                                   
davidism
  • 121,510
  • 29
  • 395
  • 339
Sagar
  • 71
  • 2
  • 3

2 Answers2

9

for windows follow the steps

  • cmd>set HomeDrive=c:/users/xxx
  • run heroku login again
  • when finished it will create _netrc in directory c:/users/xxx
Sasi Kumar M
  • 2,440
  • 1
  • 23
  • 23
6

Try running it from GIT BASH cmd, I had the same problem and it worked in my case.