How do I install Chocolatey packages behind a proxy on Windows 2012 R2 Core?
Choco series 0.9.9+ was a total rewrite and hasn't implemented all the things yet, including proxy support out of what you set in IE.
Watch issue https://github.com/chocolatey/choco/issues/243 to know when it available again.
Update: proxy support is in Chocolatey now - see https://github.com/chocolatey/choco/wiki/Proxy-Settings-for-Chocolatey
run this first
choco config set proxy http://proxy_host:proxy_port
I tried this in November 2018:
So, three steps are needed to install and run chocolatey:
You need to go and manually download the installation file from:
https://chocolatey.org/install.ps1
You need to either:a. edit the ps1 file OR
b. your environmental variables.
You need to have the following variables:
$env:chocolateyProxyLocation = "http://USER:PASSWORD@http://USER:PASSWORD@IP_ADDRESS:PORT $env:chocolateyProxyUser = "USER" $env:chocolateyProxyPassword = "PASSWORD" THEY MUST BE AS THEY ARE ABOVE with USER:PASSWORD@PROXY_LOCATION:PORT format.
- You must call the install.ps1 file. You can call it either from Windows-PowerShell ISE or from the CommandLine
You must call your local script!!! Not the online one, e.g.:
file:///E:/softwares/chocolate_install_script/install.ps1
Call the following:
C:\WINDOWS\system32>@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('file:///E:/softwares/chocolate_install_script/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
- And everything will work if you run this with admin provileges
After, you will need to do:
choco config set proxy http://USER:PASSWORD@IP_ADDRESS:PORTchoco config set proxyUser bobchoco config set proxyPassword 123Sup#rSecur3