Search code examples
githubnugetnuget-server

Nuget restore from github package manager giving 403


We have a private set of nuget packages in GitHub. Until recently, I was able to restore packages from this repository and view them in the package manager. Now, I'm getting 403 errors:

Retrying 'FindPackagesByIdAsync' for source 'https://nuget.pkg.github.com/MyCompany/download/MyPackage/index.json'. Response status code does not indicate success: 403 (Forbidden).

This source is setup in my Nuget.Config and previously worked.

What I've tried:

  • Regenerated my PAT
  • Deleted my PAT and created a new one.
  • Cleared the Nuget Cache
  • Cleared temp files from %AppData%\local\temp
  • Removed the VSCredentials_nuget.pkg.github.com credential. Also tried editing the credential and pasting in my new PAT.

Anything else I can try?


Solution

  • Turns out, I forgot the "Configure SSO" step to authorize the PAT for SSO. Once I did that, it worked.