I keep getting this error but if I do sudo heroku login it works... How do I fix this, I even tried to do ssh generate but it works with sudo only too...
The-MacBook-Pro:prod lior$ heroku login
! Error reading /Users/lior/.netrc
! Permission denied - /Users/lior/.netrc
! You may need to delete this file and run `heroku login` to recreate it.
Best How To :
When you run
heroku login command, it will write your Heroku API key to the
If you first run
sudo heroku login, then the
.netrc file will be owned by the root account and not your user account. Unless you change permissions on the file using
chmod a+x ~/.netrc or change ownership with
sudo chown lior ~/.netrc then you wont be able to read or write to the
~/.netrc file and running
heroku login is another way to solve the problem.