Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating To Heroku Toolbelt v4 gets Access Denied Error

Annoying out of nowhere my Heroku toolbelt always attempts to update anytime I make a Heroku command. This wouldn't be so bad if it actually did update but no matter what permissions I give to the desination folder or CMD I get an Access is Denied error.

This makes executing commands on with Heroku extremely time consuming because it always re-downloads the update and fail in setting up Node before executing the command I ask it to.

Below is an example of what the error looks like.

Installing Heroku Toolbelt v4... done.
For more information on Toolbelt v4: https://github.com/heroku/heroku-cli
Setting up node-v4.1.1... ▸    rename C:\Users\Anthony\.heroku\tmp\download110460667\file C:\Users\Anthony\.heroku\node-v4.1.1-windows-x86\bin\node.exe: Access is denied.
error loading plugin commands
error loading plugin topics
error loading plugin commands
like image 754
SARose Avatar asked Sep 27 '15 14:09

SARose


People also ask

How to run heroku CLI on windows?

Get Started with the Heroku CLIAfter you install the CLI, run the heroku login command. Enter any key to go to your web browser to complete login. The CLI then logs you in automatically. If you'd prefer to stay in the CLI to enter your credentials, run heroku login -i .

How do I know if heroku is installed?

Open Command Prompt by right-clicking the Start Menu, choose Run, enter cmd and click OK. Now type heroku and press enter. If you receive a help message, heroku-cli was installed successfully.


2 Answers

I fixed this by deleting the folders Username/.heroku , and Username/AppData/Local/heroku, (Replace "Username" with your username) then run heroku login results in a successful install of node, after that it seems to work smoothly (so far). Probably deleting the first folder isn't necessary -- but that's what I did in any case.

Good luck

PS: Running on Windows 8

like image 80
notmyname Avatar answered Sep 19 '22 00:09

notmyname


Same problem here, on Windows 7 64Bit. Got it to work somehow...

Deleting the folders and running heroku again did not work for me, nor did renaming/removing the node.exe file. Uninstalling pre-existing node.js installation and cleaning up PATH also did not help. In the end I edited the heroku.bat, setting a minimal PATH with nothing but the ruby, heroku and git parts, i.e.

@SET PATH=%HEROKU_RUBY%;%HerokuPath%\bin;C:\Program Files (x86)\Git\cmd

The node post-install went ok and I could login and clone an app with my pre-existing git installation. It even kept working after I reverted the batch file to the original PATH spec.

I have no clue why it didn't work with my orignal PATH, as there are no anomalies like & ampersands in it and no old ruby or node.js installs. But now it works and I'm a happy camper :-)

like image 42
Norbert Schöpke Avatar answered Sep 19 '22 00:09

Norbert Schöpke