Skip to content

Commit 99744ba

Browse files
authored
Update compiled-languages-csharp.md
1 parent 7a5a2bb commit 99744ba

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

troubleshooting/codeql-builds/compiled-languages-csharp.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,22 @@ This can indicate your custom package server is not configured which may fail th
5757

5858
#### NuGet.targets(132,5): warning : Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
5959

60-
Consider adding auth for your GitHub Packages hosted NuGet feed using the nuget CLI tooling. Add this before the `autobuild` / custom build steps in your workflow.
60+
The actions/setup-dotnet action supports [setting up authentication for nuget feeds](https://github.com/actions/setup-dotnet#setting-up-authentication-for-nuget-feeds). Add this before the `autobuild` / custom build steps in your workflow:
61+
```yml
62+
- uses: actions/setup-dotnet@v3
63+
with:
64+
source-url: https://nuget.pkg.github.com/<owner>/index.json
65+
env:
66+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
67+
```
68+
69+
Alternatively, consider adding auth for your GitHub Packages hosted NuGet feed using the nuget CLI tooling.
6170
6271
```yml
6372
- name: add nuget auth
6473
run: dotnet nuget add source https://nuget.pkg.github.com/<org-goes-here>/index.json -n "GitHub" -u USERNAME -p "${{ secrets.GH_PACKAGES_READ_ONLY }}" --store-password-in-clear-text
6574
```
6675
67-
6876
### .NET Framework
6977
7078
#### NuGet Authentication

0 commit comments

Comments
 (0)