Authenticating Github Packages

938 Views Asked by At

I am completely unable to pull NuGet packages from my Private repos in my Organization.

I am using visual studio code, and the dotnet nuget add package command to no avail.

I have tried using classic PAT, Fine Grained PAT, with ALL permissions checked, and get 403 Forbidden responses every time.

If I use my account's password, I get a 401 response. I am setting up the source with the dotnet nuget add source pointing to my organization source, and passing username and password (I've tried storing in plain text and not, no difference)

Is there any trick to getting it to work? I feel like github packages is pretty useless for private orgs if we can't use it as a package source for private repos

1

There are 1 best solutions below

0
On

Found the solution:

My org did not have permissions set for Classic tokens, and fine grained tokens do not expose the packages permissions.

To fix, I went into my org settings => Personal Access Tokens => settings => set "Personal access token (classic)" to allow