Skip to content

Commit

Permalink
Added an item with github source authentication to the dotnet CLI in …
Browse files Browse the repository at this point in the history
…the instructions for GitHub Packages (github#33314)

Co-authored-by: Jacob Wallraff <[email protected]>
Co-authored-by: Alex Nguyen <[email protected]>
  • Loading branch information
3 people authored Jul 9, 2024
1 parent 7e1f7c6 commit a98837d
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ If your instance has subdomain isolation disabled:

## Publishing a package

You can publish a package to {% data variables.product.prodname_registry %} by authenticating with a _nuget.config_ file, or by using the `--api-key` command line option with your {% data variables.product.prodname_dotcom %} {% data variables.product.pat_v1 %}.
You can publish a package to {% data variables.product.prodname_registry %} by authenticating with a _nuget.config_ file, using the `--api-key` command line option with your {% data variables.product.prodname_dotcom %} {% data variables.product.pat_v1 %} or by using command that can be run directly from the command line using the `dotnet` command-line interface (CLI).

Replace `OWNER` with your username or company name, and `YOUR_GITHUB_PAT` with your {% data variables.product.pat_generic %}.

```shell
dotnet nuget add source --username OWNER --password {%raw%}YOUR_GITHUB_PAT{% endraw %} --store-password-in-clear-text --name github "https://{% ifversion fpt or ghec %}nuget.pkg.github.com{% else %}nuget.HOSTNAME{% endif %}/OWNER/index.json"
```

{% ifversion packages-nuget-v2 %}

Expand Down

0 comments on commit a98837d

Please sign in to comment.