After a fresh install of Heroku on Windows 7, I can't seem to authenticate from the command-line.
Running the command: heroku login
prompts me to enter my credentials. After doing so, I received an error:
heroku: Enter your login credentials
Email: my_email
Password: ************
Error: ENOENT: no such file or directory, open 'z:/_netrc'
I am using PowerShell, and when I run the command cat z:/_netrc
, I get this error:
cat : Cannot find drive. A drive with the name 'z' does not exist.
Z:
is a network drive, and it is accessible from the file explorer.
I already have a .netrc
file in my %HOME% path, but it does not contain the heroku login credentials.
Looking at the official documentation and CLI help, I couldn't find anything useful to fix this. How can I login to my heroku account?
> heroku version
heroku/7.16.6 win32-x64 node-v10.11.0
If you're having issues with the CLI, ensure that you're using the latest version. If you're not, try updating with heroku update . Not all methods of installation support heroku update . If you installed the CLI with apt , you must use sudo apt-get update && sudo apt-get upgrade heroku .
Reset your password and try logging in with the new password. Try using a different email address. Try using an email alias with a plus sign if you might have signed up using an alias such as [email protected] instead of just [email protected]. Confirm that your account hasn't been closed due to delinquency.
The heroku gem stores your credentials in ~/. heroku/credentials and the related code is in lib/heroku/auth.
So, the issue is arising from not finding _netrc
file on your local computer that is required to complete login with Heroku. I have decided to create the file into following location of my windows 10 computer:
cmd>set HomeDrive=C:/Users/your Windows username/AppData/Local/heroku
In my case,
cmd>set HomeDrive=C:/Users/CrazyMoby/AppData/Local/heroku
Finally I ran heroku login
The above step resolved heroku login issue in my case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With