无法在Windows上安装chocolatey模块(证书错误?)

时间:2014-09-03 09:29:12

标签: certificate puppet

我试图使用Puppet在Windows上安装.NET。我正在使用rismoney-chocolatey模块。但是,当我尝试安装此模块时:

puppet module install rismoney-chocolatey

我收到以下错误:

[mNotice: Preparing to install into C:/ProgramData/PuppetLabs/puppet/etc/modules ...[0m
[mNotice: Downloading from https://forgeapi.puppetlabs.com ...[0m
Failed to add /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
Failed to add /C=ZA/ST=Western Cape/L=Durbanville/O=Thawte/OU=Thawte Certification/CN=Thawte Timestamping CA
Failed to add /C=US/ST=Washington/L=Redmond/O=Microsoft Corporation/CN=Microsoft Root Certificate Authority 2011
Failed to add /C=DE/O=TC TrustCenter GmbH/OU=TC TrustCenter Class 2 CA/CN=TC TrustCenter Class 2 CA II
Failed to add /C=DE/ST=Hamburg/L=Hamburg/O=TC TrustCenter for Security in Data Networks GmbH/OU=TC TrustCenter Class 3 CA/emailAddress=certificate@trustcenter.de
Failed to add /C=DE/ST=Hamburg/L=Hamburg/O=TC TrustCenter for Security in Data Networks GmbH/OU=TC TrustCenter Class 2 CA/emailAddress=certificate@trustcenter.de
Failed to add /C=DE/O=TC TrustCenter GmbH/OU=TC TrustCenter Universal CA/CN=TC TrustCenter Universal CA I
Failed to add /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 1999 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G3
Failed to add /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
Failed to add /C=ZA/ST=Western Cape/L=Durbanville/O=Thawte/OU=Thawte Certification/CN=Thawte Timestamping CA
Failed to add /C=US/ST=Washington/L=Redmond/O=Microsoft Corporation/CN=Microsoft Root Certificate Authority 2011
Failed to add /C=DE/O=TC TrustCenter GmbH/OU=TC TrustCenter Class 2 CA/CN=TC TrustCenter Class 2 CA II
Failed to add /C=DE/ST=Hamburg/L=Hamburg/O=TC TrustCenter for Security in Data Networks GmbH/OU=TC TrustCenter Class 3 CA/emailAddress=certificate@trustcenter.de
Failed to add /C=DE/ST=Hamburg/L=Hamburg/O=TC TrustCenter for Security in Data Networks GmbH/OU=TC TrustCenter Class 2 CA/emailAddress=certificate@trustcenter.de
Failed to add /C=DE/O=TC TrustCenter GmbH/OU=TC TrustCenter Universal CA/CN=TC TrustCenter Universal CA I
Failed to add /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 1999 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G3
[mNotice: Installing -- do not interrupt ...[0m
C:/ProgramData/PuppetLabs/puppet/etc/modules
└── rismoney-chocolatey ([0;36mv0.0.3[0m)

然后无法使用此模块 - 如果我尝试应用使用它的木偶脚本,我会收到以下错误:

package { 'DotNet4.5':
    ensure          => installed,
    provider        => 'chocolatey',
}

给出:

Error: /Package[DotNet4.5]: Provider chocolatey is not functional on this host

(我已尝试按照troubleshooting documents中的说明安装GeoTrust CA证书,但这并不能解决问题。)

3 个答案:

答案 0 :(得分:0)

回答我自己的问题......

似乎rismoney-chocolatey模块目前(在询问/回答时)实际上没有安装巧克力。

所以解决方法是通过其他方式安装巧克力。

参考:https://github.com/chocolatey/puppet-chocolatey/issues/28

答案 1 :(得分:0)

我有同样的问题,但解决方法是通过以下方式使用“官方”巧克力包:

config.vm.provision :shell, inline: "puppet module install chocolatey-chocolatey"

我使用它的项目在这里:https://github.com/Catharz/win-ruby-dev

答案 2 :(得分:0)

已经有一段时间了,但现在Chocolatey提供者住在https://forge.puppetlabs.com/chocolatey/chocolatey,您可以看到我们支持确保Chocolatey本身安装

include chocolatey

我们还提供商务友好的内部选项,因此无需上网即可。

class {'chocolatey':
  chocolatey_download_url => 'https://internalurl/to/chocolatey.nupkg',
  use_7zip                => false,
  choco_install_timeout   => 2700,
}

https://forge.puppetlabs.com/chocolatey/chocolatey#usage