Integrating ProGet with Chocolatey
Table of Contents
If you want to use ProGet as a private Chocolatey repository, follow these steps to host, push, and install Chocolatey packages from ProGet.
1. Create a Chocolatey Feed in ProGet#
- Log into your ProGet Web UI (
http://localhost:81or your configured address). - Go to
Feeds→Create New Feed. - Select Feed Type:
Chocolatey. - Give it a name, e.g.,
choco-packages. - Configure permissions (optional) to control who can push/install packages.
- Click “Create Feed”.
2. Configure Chocolatey to Use ProGet#
Run this in PowerShell (as Admin) to add ProGet as a Chocolatey source:
choco source add -n="ProGetChoco" -s "http://proget.local/chocolatey/choco-packages/"
Replace
proget.localwith your actual ProGet server URL.
Verify the source was added:
choco source list
3. Upload or Push Chocolatey Packages#
A. Manually Upload Packages#
- Download a
.nupkgChocolatey package fromhttps://community.chocolatey.org/. - Go to your ProGet feed (
http://proget.local/chocolatey/choco-packages/). - Click Upload Package → Select the
.nupkgfile. - Click Upload.
B. Push Packages Using API Key#
- Generate an API key in ProGet:
- Go to
User Profile→API Keys→Create API Key.
- Go to
- Use this PowerShell command to push a package:
choco push mypackage.nupkg --source http://proget.local/chocolatey/choco-packages/ --api-key YOUR_API_KEY
4. Install Chocolatey Packages from ProGet#
Now that your packages are hosted in ProGet, install them like this:
choco install mypackage -s "http://proget.local/chocolatey/choco-packages/"
To make ProGet the default Chocolatey source, remove the default Chocolatey community source:
choco source remove -n="chocolatey"
5. Automate & Secure#
- Enable SSL (HTTPS) in IIS for security.
- Restrict Access by requiring authentication for Chocolatey package downloads.
- Use Retention Policies to clean up old package versions.
Now you have a private Chocolatey repository using ProGet! 🎉
Read other posts