Skip to content

Unable to push .net framework package to github 422 #27111

Answered by jcansdale
lesma asked this question in Actions
Discussion options

You must be logged in to vote
lesma:

To pack: .nuget\NuGet.exe pack “C:\projects\reponame\ABC.Package” -OutputDirectory “C:\projects\reponame\ABC.Package\bin\Release”
To push .nuget\Nuget.exe push ABC.Package\bin\Release\abc.package.13.1.0.nupkg -Source https://github.com/orgname/repo-name

You would need to use something like this:

nuget.exe push ABC.Package\bin\Release\abc.package.13.1.0.nupkg -Source https://nuget.pkg.github.com/orgname -ApiKey <PAT with write:packages and repo scope>

Note the source is https://nuget.pkg.github.com/orgname not a GitHub repo. The associated repo is specified using the repository element of your .nuspec or (more commonly) the RepositoryUrl property of your .csproj.

I hope that …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packages Host your dependencies, libraries, and production-ready code, right from your repository Product Feedback
2 participants