4

Much like this thread: Publishing and Consuming GitHub Package Repository with NuGet: Unable to load the service index error

I have the csproj correct, the nuget.config correct (same as in that thread, but for my username), and following the answer where the token has all the rights, and I do the dotnet nuget add source, and the dotnet nuget push (same formatting/syntax).

However, I always always get this:

warn: <username> does not have the correct permissions to execute 'CreatePackageVersion' Forbidden https://nuget.pkg.github.com/(username)/ 687ms error: Response status code does not indicate success: 403 (Forbidden). 

I've tried with/without the -k (git token) in the dotnet nuget push, no effect. The --interactive that it recommends, doesn't change anything.

I'm running this in a standard command line in the \bin\Release\netstandard2.0\publish directory, after having published to that folder.

Did already restart computer even after adding appropriate csproj and nuget.config data. Also tried doing @username and username (my username with and without an at sign, since all docs have no actual username examples, many blackened out).

(I do want it to be public readable, already added source .../(username)/index.json).

1 Answer 1

1

Check the RepositoryUrl in your csproj. It should match the repository you're uploading packages to. You may also need to set PublishRepositoryUrl.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.