Error installing nuget package from GitHub Packages in GitHub Action

Trying to install nuget package from GitHub Packages using Github Actions, but get error

Unable to load the service index for source
Response status code does not indicate success: 404 (Not Found).

Im running a self hosted runner. I tried manually to install the nuget package from the _work folder. And it works just fine:
./BackupContent/nuget.exe install NameOfNugetPackage -Source “” -OutputDirectory BackupContent -x

The step looks like this:

- name : Install NuGet package   

        shell: powershell

        run: |

               ./BackupContent/nuget.exe install NameOfNugetPackage -Source "" -OutputDirectory BackupContent -x

Please help :slight_smile:
Any idea why it’s not working when doing it from a github action?

Let me answer my own question, it seems to be an access issue. I was running my github runner as a service. When I changed it to run in a “command” window, It worked just fine.