Skip to content

chocolatey module bootstrap does not support forward proxy #50581

@chris-scentregroup

Description

@chris-scentregroup

Straight out of develop, https://github.com/saltstack/salt/blob/develop/salt/modules/chocolatey.py#L212-L218.

Resolution: update webclient if a proxy is set on the minion or environment.

Particularly important on windows when proxy is set, requests backend is used and other things can be installed by proxy until calling the chocolatey.bootstrap which will render:

[INFO    ] Executing command 'C:\Windows\SYSTEM32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin' in directory 'C:\Users\Administrator'
[ERROR   ] Command 'chcp 437 > nul & C:\Windows\SYSTEM32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin' failed with return code: 1
[ERROR   ] stderr: Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEFeaturenew functionality including changes to functionality and code refactors, etc.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions