Accessing your NuGet API Key

For usage with the repository manager, NuGet API keys are only needed when packages are going to be deployed. Users with the necessary apikey-all security privilege can access the NuGet API Key feature view via the User menu by pressing on their username in the main toolbar.

You can access your NuGet API key by pressing on the Access API Key button and providing password. The resulting user interface context is displayed in Figure: “Accessing your NuGet API Key”. It shows the key as well as the full command line to register the key for usage with nuget.

The Reset API Key button can be used to invalidate an existing API key and create a new one.

Figure: Accessing your NuGet API Key

Usage of the API key requires the NuGet API-Key Realm to be activated. To do this, simply add the realm to the active realms in the Realms feature of the Security menu from the Administration menu. General details are available in Realms.

Command line based Deployment to a NuGet Hosted Repository

The nuget command line tool allows you to deploy packages to a repository with the push command. The command requires you to use the NuGet API Key and the URL of the target hosted repository. For example, you could push to the default hosted repository using the URL http://localhost:8081/repository/nuget-hosted.

Using the delete command of nuget allows you to remove packages in a similar fashion. Further information about the command line tool is available in the online help.