Installing puppetlabs/apt fails with '302 Foun

2019-09-10 13:52发布

问题:

So I have a vagrant / puppet setup for my project* and am running Ubuntu 14.04 on it. It just broke, without changing anything. puppet module install puppetlabs-apt inside the VM fails with the following lines:

Error: Could not execute operation for 'puppetlabs/apt'
The server being queried was https://forge.puppetlabs.com
The HTTP response we received was '302 Found'
Check the author and module names are correct.

I'm using this module for quite some time and it seems like it just stopped working for no reason. Any advice appreciated.

-- Edit: answer question running it with --debug doesn't help much I guess

 Notice: Preparing to install into /home/vagrant/.puppet/modules ...
 Notice: Created target directory /home/vagrant/.puppet/modules
 Notice: Downloading from https://forge.puppetlabs.com ...
 Error: Could not execute operation for 'puppetlabs/apt'
 The server being queried was https://forge.puppetlabs.com
 The HTTP response we received was '302 Found'
 Check the author and module names are correct.

*Link: https://github.com/dwalldorf/owTracker vagrant up / vagrant ssh and puppet module install puppetlabs-apt

回答1:

This should be fixed. You can check FORGE-327 for more information



回答2:

https://forge.puppetlabs.com/puppetlabs/apt redirect to https://forge.puppet.com/puppetlabs/apt

you can force it to use the correct forge by appending --module_repository https://forge.puppet.com/ so it will become

puppet module install puppetlabs-apt --module_repository https://forge.puppet.com/

not sure exactly why it wants to download from https://forge.puppetlabs.com at first place, you could check your puppet.conf