Configure NuGet for Potato Templates
Set up your NuGet sources so you can install the Potato templates from your package registry.
What you’ll configure
- Add a private NuGet source for the organization feed
- Authenticate securely with a Personal Access Token (PAT)
- Verify the configuration
Feed URL (GitHub Packages):
https://nuget.pkg.github.com/Triple-Arm-Technique-ApS/index.json
Option A: Use the dotnet CLI (recommended)
This stores credentials securely on Windows and macOS. On Linux, credentials may be stored in clear text unless a keyring is available.
dotnet nuget add source \
https://nuget.pkg.github.com/Triple-Arm-Technique-ApS/index.json \
--name github \
--username <YOUR_GITHUB_USERNAME> \
--password <YOUR_GITHUB_PAT>
Notes:
- The PAT must have the
read:packagesscope. - If you hit issues on Linux, add
--store-password-in-clear-textor configure a keyring.
Verify the source was added:
dotnet nuget list source
You should see an entry named github pointing to the feed URL above.
Option B: Edit NuGet.Config manually
You can add the source by editing NuGet.Config. Preferred locations:
- User-level: Windows
%AppData%\NuGet\NuGet.Config, macOS/Linux~/.nuget/NuGet/NuGet.Config - Project-level:
NuGet.Configin your solution or repo root
Example (NuGet.Config):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="github" value="https://nuget.pkg.github.com/Triple-Arm-Technique-ApS/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<packageSourceCredentials>
<github>
<add key="Username" value="<YOUR_GITHUB_USERNAME>" />
<add key="ClearTextPassword" value="<YOUR_GITHUB_PAT>" />
</github>
</packageSourceCredentials>
<!-- Optional: prefer GitHub Packages over nuget.org for specific packages
<packageSourceMapping>
<packageSource key="github">
<package pattern="Tat.Potato.*" />
</packageSource>
</packageSourceMapping>
-->
</configuration>
Security tips:
- Avoid committing tokens to source control. Prefer user-level config or the CLI method above.
- For CI, use secret variables and
dotnet nuget add sourceduring the build rather than storing credentials in files.
Next steps
- Install the templates: Install and Use Potato Templates
- If
dotnet new install Tat.Potato.Templatesfails, re-run with--add-source https://nuget.pkg.github.com/Triple-Arm-Technique-ApS/index.jsonto ensure the feed is used.