Authenticaion installing Chocolatey packages hosted in VSTS -
at work, create nuget packages store in vsts. developers have added our repository global nuget.config (in folder %appdata%\nuget), created personal access token (pat), , installed credentialprovider.vss.exe. therefore restoring nuget packages using command line, e.g. nuget.exe restore
, done without having supply passwords or user names.
when using same recipe chocolatey packages, things don't work well. blog @ roadtoalm.com describes how can install chocolatey packages stored in vsts, have supply pat, repository address , user name (although latter can bogus value, it's not being used). there no way have chocolatey use credential provider nuget doing it?
update: after having added choco repository list of known repos, chocolatey.config file looks like
<sources> <source id="chocolatey" value="https://chocolatey.org/api/v2/" disabled="true" bypassproxy="false" selfservice="false" priority="0" /> <source id="companychoco" value="https://company.pkgs.visualstudio.com/_packaging/companychoco/nuget/v2/" disabled="false" bypassproxy="false" selfservice="false" priority="1" /> </sources>
as suggested @starain-msft, i've created package.config file, looks this:
<?xml version="1.0" encoding="utf-8"?> <packages> <package id="mypackage" version="0.0.4" source="https://company.pkgs.visualstudio.com/_packaging/companychoco/nuget/v2/" /> </packages>
i have ensured have latest version of credentialprovider.vss.exe installed in %appdata%\local\nuget\credentialproviders. when doing "choco install package.config", still prompted username , password.
try these steps:
- define packages in packages.config
- call choco source add command add source (using choco source list check sources)
- call choco install [packages.config] command install packages.
Comments
Post a Comment