GitHub Package Registry and GitHub Actions - 500 Bad Request

Because the .nupkg file size got large to the point that when uploading the package to NuGet Gallery or GitHub Package Registry, it fails with either timeout errors or connection reset by peer errors, I have used GitHub Actions as the last resort.

I have implemented the logic where it uploads the resulting package to the NuGet Gallery, and it worked fine with the correct authentication credentials. Now, I am trying to implement the same logic for GitHub Package Registry.

When I am finished, it gets to the last step successfully, and after 2 seconds of upload, it errors out with 500 Bad Request. I was able to upload the older version of the app to the registry locally. I made sure that I have got everything right, including the username and the password.

The current run which failed is here: https://github.com/EoflaOE/Kernel-Simulator/runs/468979442?check_suite_focus=true

The logic file: https://github.com/EoflaOE/Kernel-Simulator/blob/master/.github/workflows/gpr.yml

How can I overcome this problem?

Turns out that I have to add RepositoryUrl and RepositoryType inside the project file. However, it’s deemed strange as to why would it publish locally on my computer earlier without the two required properties.

I have checked the error message as written in the failed “successful” run, and it says that I have to add them. The error message is written in the CURL output.

X-Nuget-Warning: No destination repository detected. Ensure the source project has a ‘RepositoryUrl’ property defined. If you’re using a nuspec file, ensure that it has a repository element with the required ‘type’ and ‘url’ attributes.

The failed “successful” run: https://github.com/EoflaOE/Kernel-Simulator/runs/478822513?check_suite_focus=true

The successful run: https://github.com/EoflaOE/Kernel-Simulator/runs/479837707?check_suite_focus=true

The final logic file: https://github.com/EoflaOE/Kernel-Simulator/blob/master/.github/workflows/gpr.yml

The project file: https://github.com/EoflaOE/Kernel-Simulator/blob/81d5418f780aa800feb6f56712e76e04a22030b1/Kernel%20Simulator/Kernel%20Simulator.vbproj#L38

1 Like