Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure pipelines: Installation of Chocolatey to default folder requires Administrative permissions. Please run from elevated prompt. #68

Open
ericnewton76 opened this issue Nov 7, 2022 · 0 comments

Comments

@ericnewton76
Copy link

ericnewton76 commented Nov 7, 2022

Just started happening since Thursday 2022-Nov-03. Used to work prior. Looks like the task will need to be updated due to some kind of fundamental change on the Azure Pipelines hosted VMs

Expected Behavior

Installs Chocolately fine.

Current Behavior

Copy of the log (note this is running on Azure Pipelines hosted VM)

Starting: Use Chocolatey
==============================================================================
Task         : Chocolatey tool installer
Description  : Acquires the latest version of Chocolatey from the internet and adds it to the PATH (if not already installed). This task only works on Windows agents
Version      : 0.3.2
Author       : David Gardiner
Help         : [More Information](https://chocolatey-community.github.io/chocolatey-azuredevops/
==============================================================================
Installing Chocolatey - this may take a few minutes
Forcing web requests to allow TLS v1.2 (Required for requests to Chocolatey.org)
Getting latest version of the Chocolatey package for download.
Not using proxy.
Getting Chocolatey from https://community.chocolatey.org/api/v2/package/chocolatey/1.2.0.
Downloading https://community.chocolatey.org/api/v2/package/chocolatey/1.2.0 to C:\Windows\SERVIC~1\NETWOR~1\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip
Not using proxy.
Extracting C:\Windows\SERVIC~1\NETWOR~1\AppData\Local\Temp\chocolatey\chocoInstall\chocolatey.zip to C:\Windows\SERVIC~1\NETWOR~1\AppData\Local\Temp\chocolatey\chocoInstall
Installing Chocolatey on the local machine
WARNING: Setting ChocolateyInstall Environment Variable on USER and not SYSTEM variables.
  This is due to either non-administrator install OR the process you are running is not being run as an Administrator.
Creating ChocolateyInstall as an environment variable (targeting 'User') 
  Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell 
  before you can use choco.
##[error]Installation of Chocolatey to default folder requires Administrative permissions. Please run from elevated prompt. Please see https://chocolatey.org/install for details and alternatives if needing to install as a non-administrator.
Finishing: Use Chocolatey

Possible Solution

Might need to include more options on the config screen to allow for non-administrative chocolately install, plus support for non-standard chocolatey install path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant