Using VSTS Package Management as a private Chocolatey Gallery

For information how to set up a private Powershell repository on VSTS check this post

I just blogged about how to use VSTS Package Management as a private Powershell repository. But here was another need that I had. I wanted a private Chocolatey gallery as well. So I did some more investigation and foudn that this is also perfectly possible. I won’t repeat all the steps in default because they are very similar in the private Powershell repository. So follow that post for more details on some steps.

The steps I performed.

  • Create a VSTS repository and download the NuGet credential provider
  • Create a Chocolatey package. I downloaded a package from Chocolatey Gallery
  • Register the NuGet feed with the NuGet v2 url (Same as for the Powershell repository)
  • Push the package to the NuGet Feed
    \NuGet.exe push -Source "vstsgallery" -ApiKey VSTS chocopackage.nupkg

     

  • Generate  a Personal Access Token to use the functionality of Package Management
  • Connect to your feed by using the NuGet v2 URL and the PAT as your password
choco install chocopackage -s "https://x.pkgs.visualstudio.com/_packaging/
vstsgallery/nuget/v2'" -u "doesnotmatter" -p "PAT"

That’s it !

Trackbacks/Pingbacks

  1. Using VSTS Package Management as a private Powershell Gallery | The Road to ALM - May 2, 2017

    […] For information how to set up a private Chocolatey repository on VSTS check this post […]