Automate chocolatey install behind proxy

Sep 13, 2013 at 12:03 PM

I'm sitting behind corporate proxy and installing chocolatey the normal way does not work, hence boxstarter is also unable to install chocolatey. The way I manually install chocolatey is with this script

Is it possible to tell boxtarter to pull down the chocolatey installation from a local repository or use my chocolatey install script above?

I have the boxstarter folder with the buildpackages folder and the rest on a file share and in that boxstarter.config I've tried to set the ChocolateyPackage to point to a local chocolatey package.

I've tried to point LocalRepo to both the buildpackages folder and our internal share for chocolatey packages (they both contains chocolatey.

No matter what I do, when I run boxstarter on a fresh machine I get:
WARNING: Waiting for service 'SMS Agent Host (CCMEXEC)' to finish stopping...
Boxstarter: LocalRepo is at \\myserver\localChocolateyRepo\
Boxstarter: Chocolatey not instaled. Boxstarter will download and install.
Exception calling "DownloadString" with "1" argument(s): "The remote server returned an error: (407) Proxy Authentication Required."
Boxstarter: Starting Windows Update Service
Boxstarter: Starting Configuration Manager Service
+ Boxstarter finished Installation session. 00:00:19.8778810
Any ideas?

Regards, Daniel
Sep 14, 2013 at 7:41 AM
Hmm. This is confusing and was never entended to be for others to mess with the ChocolateyRepo and ChocolateyPackage settings, but now that you mention the proxy issue I can see the appeal. What you want to do is change the Chacolatey Repo to point to a local install.ps1 basically mirroring that is the bootstrapper and will load the chocolatey package from chocolateypackage.

That said, I like your script and it would be ideal because I dont want anyone to have to go through hoops to do this. Would you like to integrate it into check-chocolatey.ps1 as a pull request? If not no worries and I'll add it.
Sep 15, 2013 at 7:01 AM
I went ahead and added th proxy while I was making some other changes. Its in commit 7b9999879607 in the VMDeploy branch which will hopefully be released in the next couple weeks.
Sep 15, 2013 at 11:13 AM
Edited Sep 15, 2013 at 11:20 AM
That's great Matt! I was just about to look in to it; good that you beat me to it :)


As a side note, one might ask oneself why this is not part of chocolatey itself and if I remember correctly Rob Reynolds/ferventcoder thought this was a great idea but his concern was that this snippet, and similar snippets, might not work that well in proxy-less situations.

Regards, Daniel