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:

  1. define packages in packages.config
  2. call choco source add command add source (using choco source list check sources)
  3. call choco install [packages.config] command install packages.

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -