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

Add basic proxy auth #99

Closed
wants to merge 4 commits into from
Closed

Add basic proxy auth #99

wants to merge 4 commits into from

Conversation

serialh0bbyist
Copy link

This allows the user to specify proxies during the chocolatey install.

$proxy.Credentials = New-Object System.Management.Automation.PSCredential ("<% @proxy_username -%>", $passwd);
$downloader.UseDefaultCredentials = $true
<%- end -%>
$downloader.Proxy = $proxy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm slightly confused about this. I thought that this was for strictly installing chocolatey itself via the puppet module. It looks like the link you sent was setting the proxy within chocolatey for packages to be installed via "choco install" correct? I did take this from https://github.com/chocolatey/choco/wiki/Proxy-Settings-for-Chocolatey and then just put it in the template file with some if statements.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@as0bu no worries, this was an FYI. It looks basically like what was implemented in chocolatey itself for installing packages and software.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ferventcoder Oh ok I see!

@rismoney
Copy link
Contributor

fwiw - i really like this PR.

@ferventcoder
Copy link
Contributor

@rismoney agreed. :)

@ferventcoder
Copy link
Contributor

I'm not sure what I did with my original comment, but @as0bu please add specs for this. This is great so far!

@serialh0bbyist
Copy link
Author

Will do. Just give me a bit since I'm currently traveling back from a long distance client location. I hope to have that done Monday or Tuesday.

@mightydok
Copy link

@as0bu do you have time to finish this PR?

@ferventcoder
Copy link
Contributor

@as0bu Ping - I know this was awhile ago. This would be a good addition to what you can pass, so if you can get those specs added and rebase this we can move forward!

@serialh0bbyist
Copy link
Author

@ferventcoder I plan to do this during this week at PuppetConf.

@serialh0bbyist
Copy link
Author

So after looking at this some more I think that commit e4c5f09 takes care of this. While the credentials aren't specified via Puppet, I think they're pulled from the operating system. @ferventcoder Could you confirm this?

@ferventcoder
Copy link
Contributor

I think it may. We could always close this for now and if you see a need to pick this up in the future, we could do it then?

@serialh0bbyist
Copy link
Author

Sounds like a plan!

@ferventcoder
Copy link
Contributor

Closing for now.

@hbuckle
Copy link

hbuckle commented Nov 23, 2016

I think this should be reopened as System.Net.WebClient will only pick up proxy settings from Internet Explorer and these are rather tricky to set automatically (requires calling WinInet in the Win32 API). A way to pass in an explicit proxy, either as a Puppet parameter or from an environment variable like the install script from chocolatey.org would be extremely useful.

@tardich
Copy link

tardich commented Nov 23, 2016

At the same time, it would be interesting to be able to use the same level of complexity that are often in place (for example, at my place, we have complex proxy settings, all managed by the proxy.pac file. It is rather difficult for us to work with only one server / one port.

@ferventcoder
Copy link
Contributor

@hbuckle @tardich explicit proxy would be great. However why don't we have you open an issue at https://tickets.puppet.com/browse/MODULES for the Puppet supported module - https://github.com/puppetlabs/chocolatey (so puppetlabs/chocolatey instead of chocolatey/chocolatey)?

This issue is not an issue at all, it is a pull request. If you think this would be good to look at with chocolatey/chocolatey, then open an issue here to address.

@ferventcoder
Copy link
Contributor

It does look like #142 was opened on this. You can comment/ subscribe to that issue.

DavidS pushed a commit to DavidS/puppetlabs-chocolatey that referenced this pull request Nov 15, 2019
…r/remove-rake-lines

(MAINT) Remove unnecessary lines from Rakefile.
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

Successfully merging this pull request may close these issues.

6 participants