0

I am working on a .NET Core web application in Visual Studio 2022.

I have a nuget package on my github and I am trying to add the github page as a source. I have generated my github PAT and authorized it, and added the package url in package sources:

https://nuget.pkg.github.com/MyGithub/index.json

However, when I run docker-compose, it fails with the message

failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c dotnet nuget add source --username USERNAME_NOT_REQUIRED --password $GITHUB_PACKAGE_PAT --store-password-in-clear-text --name github_mygithub_om_registry "https://nuget.pkg.github.com/MyGithub/index.json"]: exit code: 1 If the error persists, try restarting Docker Desktop

It seems to be related to a local setting, because other team members are able to build the project, and we have the same docker config settings.

Eutherpy
  • 4,471
  • 7
  • 40
  • 64
  • Are you using this for nuget restore inside the dockerfile? – Luke Briner Feb 07 '22 at 11:57
  • @LukeBriner Yes – Eutherpy Feb 07 '22 at 14:40
  • There shouldn't be anything local that is relevant if you have checked out the same code, although one possibility is a file that is ignored by git but included in docker. The other possibility is that you have a valid access key but it doesn't have the correct permissions? If you run up a container with just the SDK, you could exec into it and run the commands directly, that way you might see more of the actual error. – Luke Briner Feb 08 '22 at 09:18

0 Answers0