Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku CLI authentication issue

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
like image 735
elmiomar Avatar asked Oct 10 '18 16:10

elmiomar


People also ask

Why heroku CLI is not working?

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 .

Why is heroku login not working?

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.

Where does heroku CLI store credentials?

The heroku gem stores your credentials in ~/. heroku/credentials and the related code is in lib/heroku/auth.


1 Answers

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.

like image 123
Asif Avatar answered Sep 23 '22 05:09

Asif