❔ How to pull nuget packages from private Github registry when doing dotnet restore in Github action
Does anyone know how to run
dotnet restore
from a Github action on a project that uses nuget packages from a private Github repository? I am currently adding the appropriate package source to nuget.config using
However dotnet restore
fails with the error:
3 Replies
It tells you that the scoped might be configured wrong. I guess check the scopes before all else
Scopes are fine, should have all the access it needs. I have used the same GitHub actions token to push nuget packages, and it has write access by default. Thinking it might be an issue with
dotnet restore
using only the url of the registry and not the credentials. When doing the nuget push the credentials are explicitly supplied directly to the command as opposed to here where they are in the nuget.config.Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.