Use a nuget.org API key when you push a stable DXA release to the public feed with Release-Dxa.ps1. Do not use the default Nexus key from build.proj against nuget.org.
Official reference: Create API keys.
- A nuget.org account that is allowed to publish
Tridion.Dxa.*packages (organization membership as required by RWS). - Two-factor authentication enabled on that account (required by nuget.org).
- Sign in at https://www.nuget.org/.
- Open API Keys: https://www.nuget.org/account/apikeys (or select your username, then API Keys).
- Select Create.
- Fill in:
- Key name — for example
dxa-core-push-YYYY-MM. - Expires — pick a short lifetime (for example 1 year or less). Rotate before expiry.
- Glob pattern —
Tridion.Dxa.*(limits the key to DXA package IDs). - Select scopes — enable Push (new packages and new versions). Enable Unlist only if you must unlist a bad package.
- Key name — for example
- Select Create. Copy the key immediately. nuget.org shows the full value once.
Store the key in a password manager or a CI secret. Never commit it to git, paste it into build.proj, or share it in chat.
Push a verified stable build to nuget.org:
.\Release-Dxa.ps1 -NuGetSource https://api.nuget.org/v3/index.json -ApiKey <nuget-org-key>Replace <nuget-org-key> with the value you copied. Preview releases (-Preview) stay on internal Nexus and must not use nuget.org.
To store the key locally for dotnet nuget (optional):
dotnet nuget setapikey <nuget-org-key> --source https://api.nuget.org/v3/index.json- On API Keys, Regenerate or Remove the leaked key.
- Create a new key with the same glob and scopes.
- Update any CI secrets or local
setapikeyentries.