Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Solution
Copilot Lvl 3
Message 11 of 19

Re: GitHub Package Registry - NuGet - 400 Bad Request

I have been accepted, pushed a package, and works fine. Did you put the GitHub username as the username, and the API key as a password? @tonyfonager 

Copilot Lvl 2
Message 12 of 19

Re: GitHub Package Registry - NuGet - 400 Bad Request

I got it working, but it actually relies on the content of the NuGet package.

 

I tried making a new "Hello World" package, and I could deploy that without issues to GPR.

 

But all other projects fails.

 

And I should maybe mention that whenever they fail, I try nuget push'ing them to my Azure Artifacts feed, and that works ecvery time without issues.

Copilot Lvl 3
Message 13 of 19

Re: GitHub Package Registry - NuGet - 400 Bad Request

Well, I can upload NuGet packages with debugging symbols to GitHub Package Registry successfully. Do you, by chance, have put in unusual variables and values in your nuspec? You can send them a ticket by emailing GitHub with the title of "GitHub Package Registry". @tonyfonager 

Ground Controller Lvl 2
Message 14 of 19

Re: GitHub Package Registry - NuGet - 400 Bad Request

@tonyfonager Can you elaborate on this? What content of the nuget package matters? I am having the same issue and am unable to determine what is causing it.

Ground Controller Lvl 2
Message 15 of 19

Re: GitHub Package Registry - NuGet - 400 Bad Request

I have the same problem too. We are trying to push nuget packages to GitHub Package Registry via Azure DevOps pipeline.

Copilot Lvl 3
Message 16 of 19

Re: GitHub Package Registry - NuGet - 400 Bad Request

@toanxyz Are you sure that you are authenticated correctly, and that you have used your API key as the password? You can e-mail GitHub.

Copilot Lvl 2
Message 17 of 19

Re: GitHub Package Registry - NuGet - 400 Bad Request

I'm getting this error as well. I was able to upload a single version last Friday, but yesterday and today I get error 400 when trying to upload artifacts.

Highlighted
Ground Controller Lvl 2
Message 18 of 19

Re: GitHub Package Registry - NuGet - 400 Bad Request

For those who can't get this to work, we have come up with a workaround using curl here https://github.com/NuGet/Home/issues/8580#issuecomment-555696372, at least until GitHub fixes problem of not allowing the apiToken to work directly using the nuget push command. 

Copilot Lvl 2
Message 19 of 19

Re: GitHub Package Registry - NuGet - 400 Bad Request

Thank you! The team did work with me for a while and ended up in a place where the suggested fix was using a NuSpec file. But your workaround does the trick and means I can keep my other processes as needed