Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added an item with github source authentication to the dotnet CLI in the instructions for GitHub Packages #33314

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ If you don't already have a {% data variables.product.pat_generic %} to use for
dotnet pack --configuration Release
```

1. Authentificate GitHub Packages with the `dotnet` command-line interface (CLI). Replace `OWNER` with your username or company name.

```shell
dotnet nuget add source --username OWNER --password ${ secrets.GITHUB_TOKEN } --store-password-in-clear-text --name github "https://nuget.pkg.github.com/OWNER/index.json"
```

1. Publish the package using your {% data variables.product.pat_generic %} as the API key. Replace `PROJECT_NAME` with the name of the project, `1.0.0` with the version number of the package, and `YOUR_GITHUB_PAT` with your {% data variables.product.pat_generic %}.

```shell
Expand Down Expand Up @@ -180,6 +186,12 @@ When publishing, {% ifversion packages-nuget-v2 %}if you are linking your packag
dotnet pack --configuration Release
```

1. Authentificate GitHub Packages with the `dotnet` command-line interface (CLI). Replace `OWNER` with your username or company name.

```shell
dotnet nuget add source --username OWNER --password ${ secrets.GITHUB_TOKEN } --store-password-in-clear-text --name github "https://nuget.pkg.github.com/OWNER/index.json"
```

1. Publish the package using the `key` you specified in the _nuget.config_ file. Replace `PROJECT_NAME` with the name of the project, and replace `1.0.0` with the version number of the package.

```shell
Expand Down
Loading