我如何在 ProGet 中设置 Chocolatey 提要作为 Chocolatey 的来源?
How do I setup a Chocolatey feed in ProGet as a source for Chocolatey?
我在 ProGet 中创建了一个名为 "Chocolatey" 的 Chocolatey 提要。现在如何从 Chocolatey 使用它?
我试过运行这个命令来添加源:
PS> choco source add --name=ProGet --source="http://my-proget-server/feeds/Chocolatey"
Chocolatey v0.10.8
Added ProGet - http://my-proget-server/feeds/Chocolatey (Priority 0)
和命令 工作 与它列出 "ProGet" 作为来源一样多:
PS> choco source list
Chocolatey v0.10.8
chocolatey - https://chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
ProGet - http://my-proget-server/feeds/Chocolatey | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
然后我禁用了默认来源:
PS> choco source disable --name=chocolatey
Chocolatey v0.10.8
Disabled chocolatey
但我一定是 ProGet 源设置错误,因为 choco search
不起作用:
PS> choco search curl
Chocolatey v0.10.8
The remote server returned an error: (400) Bad Request.
我应该将 choco source add
命令的 source
参数设置为提要的 "Package Source URL"。我提供的值实际上是 ProGet webapp 中提要的 'details' 页面,该页面显示包源 URL。在我的例子中,运行 的正确命令(在删除错误源之后)是:
choco source add --name=ProGet --source="http://my-proget-server/nuget/Chocolatey"
这里是解决问题和测试它是否有效的所有命令,全部在一起[在命令输出和任何后续命令之间添加空格]:
PS> choco source remove --name=ProGet
Chocolatey v0.10.8
Removed ProGet
PS> choco source add --name=ProGet --source="http://my-proget-server/nuget/Chocolatey"
Chocolatey v0.10.8
Added ProGet - http://my-proget-server/nuget/Chocolatey (Priority 0)
PS> choco source disable --name=chocolatey
Chocolatey v0.10.8
Nothing to change. Config already set.
PS> choco source list
Chocolatey v0.10.8
chocolatey [Disabled] - https://chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
ProGet - http://my-proget-server/nuget/Chocolatey | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
PS> choco search curl
Chocolatey v0.10.8
curl 7.56.1 [Approved]
Cmder 1.3.3 [Approved] Downloads cached for licensed users
cmdermini 1.3.3 [Approved] Downloads cached for licensed users
insomnia-rest-api-client 5.11.0 [Approved] Downloads cached for licensed users
rust 1.21.0 [Approved] Downloads cached for licensed users
git-lfx 0.1.0 [Approved]
jivkok.dev1 1.1.0.8 - Possibly broken
etcd 3.2.9 [Approved] Downloads cached for licensed users
tivotogo-plex 2016.12.30 [Approved] Downloads cached for licensed users
rust-ms 1.21.0 [Approved] Downloads cached for licensed users
mve 2016.05.17.00 [Approved] Downloads cached for licensed users
11 packages found.
我在 ProGet 中创建了一个名为 "Chocolatey" 的 Chocolatey 提要。现在如何从 Chocolatey 使用它?
我试过运行这个命令来添加源:
PS> choco source add --name=ProGet --source="http://my-proget-server/feeds/Chocolatey"
Chocolatey v0.10.8
Added ProGet - http://my-proget-server/feeds/Chocolatey (Priority 0)
和命令 工作 与它列出 "ProGet" 作为来源一样多:
PS> choco source list
Chocolatey v0.10.8
chocolatey - https://chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
ProGet - http://my-proget-server/feeds/Chocolatey | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
然后我禁用了默认来源:
PS> choco source disable --name=chocolatey
Chocolatey v0.10.8
Disabled chocolatey
但我一定是 ProGet 源设置错误,因为 choco search
不起作用:
PS> choco search curl
Chocolatey v0.10.8
The remote server returned an error: (400) Bad Request.
我应该将 choco source add
命令的 source
参数设置为提要的 "Package Source URL"。我提供的值实际上是 ProGet webapp 中提要的 'details' 页面,该页面显示包源 URL。在我的例子中,运行 的正确命令(在删除错误源之后)是:
choco source add --name=ProGet --source="http://my-proget-server/nuget/Chocolatey"
这里是解决问题和测试它是否有效的所有命令,全部在一起[在命令输出和任何后续命令之间添加空格]:
PS> choco source remove --name=ProGet
Chocolatey v0.10.8
Removed ProGet
PS> choco source add --name=ProGet --source="http://my-proget-server/nuget/Chocolatey"
Chocolatey v0.10.8
Added ProGet - http://my-proget-server/nuget/Chocolatey (Priority 0)
PS> choco source disable --name=chocolatey
Chocolatey v0.10.8
Nothing to change. Config already set.
PS> choco source list
Chocolatey v0.10.8
chocolatey [Disabled] - https://chocolatey.org/api/v2/ | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
ProGet - http://my-proget-server/nuget/Chocolatey | Priority 0|Bypass Proxy - False|Self-Service - False|Admin Only - False.
PS> choco search curl
Chocolatey v0.10.8
curl 7.56.1 [Approved]
Cmder 1.3.3 [Approved] Downloads cached for licensed users
cmdermini 1.3.3 [Approved] Downloads cached for licensed users
insomnia-rest-api-client 5.11.0 [Approved] Downloads cached for licensed users
rust 1.21.0 [Approved] Downloads cached for licensed users
git-lfx 0.1.0 [Approved]
jivkok.dev1 1.1.0.8 - Possibly broken
etcd 3.2.9 [Approved] Downloads cached for licensed users
tivotogo-plex 2016.12.30 [Approved] Downloads cached for licensed users
rust-ms 1.21.0 [Approved] Downloads cached for licensed users
mve 2016.05.17.00 [Approved] Downloads cached for licensed users
11 packages found.