Cli: Login not working under normal cmd

Created on 28 Dec 2018  路  4Comments  路  Source: heroku/cli

C:\Users\MainUser>heroku login
heroku: Press any key to open up the browser to login or q to exit:
Logging in... done
Error: EPERM: operation not permitted, open 'C:/WINDOWS/system32/config/systemprofile/_netrc'

latest heroku version installed

All 4 comments

Only works if cmd is run as admin...

These are the env vars used to determine where to save the netrc file. You should set one (probably USERPROFILE) to a writeable space.

https://github.com/jdxcode/node-netrc-parser/blob/0ee433f9a27cfae1ecbc6bf0cdf4108b7e2d547f/src/netrc.ts#L178

@RasPhilCo
Thank you for your reply: I really appreciate you linking me to the precise line!

in the mean time I've confirmed that the system variable HOME is set to %USERPROFILE%
then i did changed it to literally C:\Users\Omar
and it worked
then i changed it back to %USERPROFILE%
and it works now...!

No idea what was going on... but problem solved.

Glad to hear it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saintthor picture saintthor  路  4Comments

sdalezman picture sdalezman  路  4Comments

dking74 picture dking74  路  7Comments

thegmann picture thegmann  路  3Comments

DennisTsiang picture DennisTsiang  路  7Comments