From 5b3873c5052a5800388f2e6d3905a3ae90a5b37a Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Tue, 9 Aug 2022 16:36:49 +0200 Subject: [PATCH] Add support for NuGet API keys (#20721) * Add support for NuGet API key. * lint * Apply suggestions from code review Co-authored-by: delvh Co-authored-by: delvh Co-authored-by: wxiaoguang Co-authored-by: Lauris BH --- doc/packages/nuget.en-us.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/packages/nuget.en-us.md b/doc/packages/nuget.en-us.md index a4435fa9..6c8aaa70 100644 --- a/doc/packages/nuget.en-us.md +++ b/doc/packages/nuget.en-us.md @@ -47,6 +47,8 @@ For example: dotnet nuget add source --name gitea --username testuser --password password123 https://gitea.example.com/api/packages/testuser/nuget/index.json ``` +You can add the source without credentials and use the [`--api-key`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push) parameter when publishing packages. In this case you need to provide a [personal access token]({{< relref "doc/developers/api-usage.en-us.md#authentication" >}}). + ## Publish a package Publish a package by running the following command: