Installing puppetlabs/apt fails with '302 Found'

核能气质少年 提交于 2020-01-07 02:21:11

问题


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



来源:https://stackoverflow.com/questions/37892134/installing-puppetlabs-apt-fails-with-302-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!