1

我正在运行 Windows Enterprise 8.1。我可以在 Windows Server 2008 R2 上执行以下操作,但无法在 Windows Enterprise 8.1 上执行此操作。我已成功安装 Chocolatey 并尝试运行“cinst poshgit”。当我这样做时,程序失败并显示以下消息:

无法连接到“ https://chocolatey.org/api/v2/ ”中指定的提要。

下面是日志文件

20140401-13:21:22 [CHOCO] ################################################################################
20140401-13:21:22 [CHOCO] #                  Going Chocolatey on 2014-04-01 13:21:22Z                    #
20140401-13:21:22 [CHOCO] ################################################################################
20140401-13:21:22 [DEBUG] Arguments: $command = 'install'|$packageNames='poshgit'|$source=''|$version=''|$allVersions=False|$InstallArguments=''|$overrideArguments=False|$force=False|$prerelease=False|$localonly=False|$verbosity=False|$debug=False|$name=''|$ignoreDependencies=False|$forceX86=False|$packageParameters=''|PowerShellVersion=4.0
20140401-13:21:22 [DEBUG] Invoke-ChocolateyFunction is calling: $ChocoFunction='Chocolatey-Install'|@paramlist='@paramlist'
20140401-13:21:22 [DEBUG] Running 'Chocolatey-Install' for 'poshgit' with source: '', version: '', installerArguments:''
20140401-13:21:22 [DEBUG] Running 'Chocolatey-NuGet' for poshgit with source:''. Force? False
20140401-13:21:22 [CHOCO] Chocolatey (v0.9.8.23) is installing 'poshgit' and dependencies. By installing you accept the license for 'poshgit' and each dependency you are installing.
20140401-13:21:22 [DEBUG] Installing packages to "C:\Chocolatey\lib".
20140401-13:21:22 [DEBUG] Running 'Run-NuGet' for poshgit with source: '', version:''
20140401-13:21:22 [DEBUG] ___ NuGet ____
20140401-13:21:22 [DEBUG] Running 'Get-ConfigValue' with configValue:'useNuGetForSources'
20140401-13:21:22 [DEBUG] Running 'Get-UserConfigValue' with configValue:'useNuGetForSources'
20140401-13:21:22 [DEBUG] After checking the user config the value of 'useNuGetForSources' is ''
20140401-13:21:23 [DEBUG] Value not found in the user config file - checking the global config
20140401-13:21:23 [DEBUG] Running 'Get-GlobalConfigValue' with configValue:'useNuGetForSources'
20140401-13:21:23 [DEBUG] After checking the global config the value of 'useNuGetForSources' is 'false'
20140401-13:21:23 [DEBUG] Running 'Get-UserConfigValue' with configValue:'sources'
20140401-13:21:23 [DEBUG] Running 'Get-GlobalConfigValue' with configValue:'sources'
20140401-13:21:23 [DEBUG] Using global sources
20140401-13:21:23 [DEBUG] Using '-Source "https://chocolatey.org/api/v2/" ' as the source arguments
20140401-13:21:23 [DEBUG] Calling 'C:\Chocolatey\chocolateyinstall\nuget.exe' install poshgit -Outputdirectory "C:\Chocolatey\lib" -Source "https://chocolatey.org/api/v2/"  -NonInteractive -NoCache
20140401-13:21:24 [DEBUG]
20140401-13:21:25 [DEBUG] Caught 'Could not connect to the feed specified at 'https://chocolatey.org/api/v2/'. Please verify that the package source (located in the Package Manager Settings) is valid and ensure your network connectivity.'
20140401-13:21:25 [CHOCO] Could not connect to the feed specified at 'https://chocolatey.org/api/v2/'. Please verify that the package source (located in the Package Manager Settings) is valid and ensure your network connectivity.
20140401-13:21:25 [CHOCO] Command 'install' failed (sometimes this indicates a partial failure). Additional info/packages: poshgit
20140401-13:21:25 [DEBUG] Exiting with non-zero exit code.

此外,当我尝试在系统事件查看器中运行任何 cinst 命令时,我得到:

从远程端点收到致命警报。TLS 协议定义的致命警报代码为 49。

4

3 回答 3

6

打开 Chocolatey.config 并将 https 更改为 http

<?xml version="1.0"?>
<chocolatey>
    <useNuGetForSources>false</useNuGetForSources>
    <checksumFiles>true</checksumFiles>
    <virusCheck>false</virusCheck>
    <cacheLocation></cacheLocation>
    <ksMessage>false</ksMessage>
    <sources>
        <source id="chocolatey" value="http://chocolatey.org/api/v2/" />
    </sources>
</chocolatey>

于 2015-03-10T21:41:13.683 回答
5

检查巧克力状态页面:https ://status.chocolatey.org/

于 2019-12-01T10:19:22.033 回答
4

我遇到了完全相同的问题。不知何故,它与网络连接有关。

我刚刚启动了提琴手看看发生了什么,当我启用 https 连接时,一切都开始工作了:)。

这也适用于 Windows 8.1 ENTERPRISE

在事件查看器中,我遇到大量 SChannel 错误(错误代码 49),请参阅 http://blogs.msdn.com/b/kaushal/archive/2012/10/06/ssl-tls-alert-protocol-amp-警报代码.aspx

于 2014-09-04T09:45:11.533 回答