Push NuGet to GitHub Package Registry

Eric J. Smith's Avatar

Eric J. Smith

20 Sep, 2019 07:17 PM

I am unable to push NuGet packages to the GitHub Package Registry because it requires a NuGet source to be created instead of just passing the token. I found the following issues:

https://github.com/NuGet/Home/issues/8580
https://github.com/NuGet/Home/issues/4126

So it appears that it's a limitation of the GitHub Package Registry for NuGet that requires a package source to be created with a username set. Here are the instructions on the GitHub site:
https://help.github.com/en/articles/configuring-nuget-for-use-with-github-package-registry

Is there any chance something could be done on the AppVeyor side to make it so that a source is created with a username and then published?

  1. Support Staff 1 Posted by Feodor Fitsner on 22 Sep, 2019 07:23 PM

    Feodor Fitsner's Avatar

    Hi Eric,

    How do you currently publish the package: via Environments or deployment step during the build?

  2. 2 Posted by Eric J. Smith on 23 Sep, 2019 02:12 AM

    Eric J. Smith's Avatar

    I’m using Environments to deploy.

  3. Support Staff 3 Posted by Feodor Fitsner on 23 Sep, 2019 02:19 AM

    Feodor Fitsner's Avatar

    OK, thanks. Will take a look how publishing could be improved to support GPR.

  4. Support Staff 4 Posted by Feodor Fitsner on 24 Sep, 2019 11:43 PM

    Feodor Fitsner's Avatar

    We've implemented GPR support. This will be deployed to the production later this week. Please watch this issue: https://github.com/appveyor/ci/issues/3104

  5. 5 Posted by Eric J. Smith on 25 Sep, 2019 04:22 PM

    Eric J. Smith's Avatar

    That's awesome! Thank you.

  6. 6 Posted by Eric J. Smith on 30 Sep, 2019 03:25 PM

    Eric J. Smith's Avatar

    Did this make it out last week? I guess the issue will be marked as closed when it is out there?

  7. Support Staff 7 Posted by Feodor Fitsner on 30 Sep, 2019 04:50 PM

    Feodor Fitsner's Avatar

    Hi Eric,

    Yes, that was deployed yesterday and you can give it a try. There is a new "Username" field on NuGet environment settings. Once specified deployment provider will be using Basic auth to push the package.

    Some notes:

    1. For API key use GitHub Personal Access Token, not your GitHub password: https://help.github.com/en/articles/configuring-nuget-for-use-with-...
    2. Source URL must be in the form https://nuget.pkg.github.com/OWNER/index.json

    Let me know how that worked.

  8. 8 Posted by Eric J. Smith on 30 Sep, 2019 04:53 PM

    Eric J. Smith's Avatar

    Hmm... I do not see a username setting for my NuGet environment. I tried creating a new one as well and I still don't see it.

  9. 9 Posted by Eric J. Smith on 30 Sep, 2019 04:55 PM

    Eric J. Smith's Avatar

    Well, I just did a hard refresh and I see it now. I will give it a try.

  10. 10 Posted by Eric J. Smith on 30 Sep, 2019 04:57 PM

    Eric J. Smith's Avatar

    That worked! Thank you!

  11. Support Staff 11 Posted by Feodor Fitsner on 30 Sep, 2019 05:02 PM

    Feodor Fitsner's Avatar

    Cool, thanks for the update!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac