Keys / NuGet
NUGET_API_KEY
A nuget.org API key that CI pushes .NET packages with.
- Expires
- you choose, up to 365 days
- API
- none; Trusted Publishing issues 1-hour keys instead
Get it
Create one on www.nuget.org/account/apikeys. The steps aren't recorded yet.
Set it
NUGET_API_KEY=...
dotnet nuget push and nuget push read it when you don't pass an API key, from NuGet 7.6 (.NET SDK 10.0.300). Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- Create a new key with the same scopes, packages and glob pattern.
- Deploy it everywhere that reads
NUGET_API_KEY. - Check that nothing still uses the old key, then delete it.
- Or select Regenerate on the old key. The new key keeps its scopes and expiry, and the old one stops working at once.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.