puppet module search using an HTTP proxy

1,472 views
Skip to first unread message

root

unread,
Jul 3, 2013, 4:13:52 PM7/3/13
to puppet...@googlegroups.com
Can anyone confirm that PE 3.0 supports this? I exported $http_proxy correctly, I beleive.
$ puppet module search something
Notice: Searching https://forge.puppetlabs.com ...
Error: Could not connect to https://forge.puppetlabs.com
There was a network communications problem
The error we caught said '407 "Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )"'
Check your network connection and try again
Error: Try 'puppet help module search' for usage
 
 

sradi

unread,
Nov 28, 2013, 8:45:21 AM11/28/13
to puppet...@googlegroups.com
I have the same issue:

[root@learn puppet]# puppet module install puppetlabs/java
Notice: Preparing to install into /etc/puppetlabs/puppet/modules ...
Notice: Downloading from https://forge.puppetlabs.com ...

Error: Could not connect to https://forge.puppetlabs.com
  There was a network communications problem
    The error we caught said '407 "Proxy Authentication Required"'

    Check your network connection and try again


After some research I found out, that Puppet supports "http_proxy_host" and "http_proxy_port" in puppet.conf. But there doesn't seem to be any support for proxy authentication with username and password.
Does anyone know, if this feature ist planned for one of the upcoming releases?

Thanks and best regards!

Felix Frank

unread,
Nov 28, 2013, 10:50:33 AM11/28/13
to puppet...@googlegroups.com
Ad hoc I find at least three bug reports around this issue:

http://projects.puppetlabs.com/issues/8281
http://projects.puppetlabs.com/issues/16923
http://projects.puppetlabs.com/issues/19547

Patches are included, try at your own risk. Your mileage may vary,
seeing as some of those bugs are old-ish.

Cheers,
Felix

On 11/28/2013 02:45 PM, sradi wrote:
> I have the same issue:
>
> [root@learn puppet]# puppet module install puppetlabs/java
> Notice: Preparing to install into /etc/puppetlabs/puppet/modules ...
> Notice: Downloading from https://forge.puppetlabs.com ...
> Error: Could not connect to https://forge.puppetlabs.com
> There was a network communications problem
> *The error we caught said '407 "Proxy Authentication Required"'*

Stephen Wallace

unread,
Nov 30, 2013, 10:40:15 PM11/30/13
to puppet...@googlegroups.com
Maybe something as simple as using httpS? The puppet module face requires https when downloading I believe.

Try 'export https_proxy=my.proxy.com'

I hope this helps.

Stephen

Arvind P R

unread,
Dec 1, 2013, 4:41:58 AM12/1/13
to puppet...@googlegroups.com
no Stephen this doesnt work
is there any other way of installing puppet modules?
through yum?

Don Law

unread,
Dec 9, 2013, 3:23:40 PM12/9/13
to puppet...@googlegroups.com
I tried two of the proposed fixes in github, but neither of them worked.  I came up with the following workaround (kludge) that happens to work because our proxy caches the authentication for a little while.  Maybe it will help someone out there who is brought here by the magic Google machine:

Stuff your proxy password in a variable so it doesn't get saved in shell history:
read pw
type password and hit enter

Now use wget to get the proxy to authenticate you.  Obviously, adjust user, proxy url, and port for your environment:

export http_proxy=http://yourproxy.yourdomain.com:8080
export https_proxy=http://yourproxy.yourdomain.com:8080
wget --proxy-user=linprox --proxy-password=$pw http://google.com wget --no-check-certificate --proxy-user=yourproxyuser --proxy-password=$pw https://google.com

Then you can do puppet module search and puppet module install until your cached credentials expire.

FWIW
Reply all
Reply to author
Forward
0 new messages