tag:help.appveyor.com,2012-11-13:/discussions/questions/41971-push-nuget-to-github-package-registryAppVeyor: Discussion 2020-04-03T18:45:15Ztag:help.appveyor.com,2012-11-13:Comment/476448042019-09-20T19:17:43Z2019-09-20T19:17:45ZPush NuGet to GitHub Package Registry<div><p>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:</p>
<p><a href="https://github.com/NuGet/Home/issues/8580">https://github.com/NuGet/Home/issues/8580</a><br>
<a href="https://github.com/NuGet/Home/issues/4126">https://github.com/NuGet/Home/issues/4126</a></p>
<p>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:<br>
<a href="https://help.github.com/en/articles/configuring-nuget-for-use-with-github-package-registry">https://help.github.com/en/articles/configuring-nuget-for-use-with-...</a></p>
<p>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?</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/476448042019-09-22T19:23:00Z2019-09-22T19:23:00ZPush NuGet to GitHub Package Registry<div><p>Hi Eric,</p>
<p>How do you currently publish the package: via Environments or deployment step during the build?</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/476448042019-09-23T02:12:45Z2019-09-23T02:12:45ZPush NuGet to GitHub Package Registry<div><p>I’m using Environments to deploy.</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/476448042019-09-23T02:19:14Z2019-09-23T02:19:14ZPush NuGet to GitHub Package Registry<div><p>OK, thanks. Will take a look how publishing could be improved to support GPR.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/476448042019-09-24T23:43:27Z2019-09-24T23:43:27ZPush NuGet to GitHub Package Registry<div><p>We've implemented GPR support. This will be deployed to the production later this week. Please watch this issue: <a href="https://github.com/appveyor/ci/issues/3104">https://github.com/appveyor/ci/issues/3104</a></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/476448042019-09-25T16:22:39Z2019-09-25T16:22:39ZPush NuGet to GitHub Package Registry<div><p>That's awesome! Thank you.</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/476448042019-09-30T15:25:09Z2019-09-30T15:25:09ZPush NuGet to GitHub Package Registry<div><p>Did this make it out last week? I guess the issue will be marked as closed when it is out there?</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/476448042019-09-30T16:50:27Z2019-09-30T16:50:27ZPush NuGet to GitHub Package Registry<div><p>Hi Eric,</p>
<p>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.</p>
<p>Some notes:</p>
<ol>
<li>For API key use GitHub Personal Access Token, not your GitHub password: <a href="https://help.github.com/en/articles/configuring-nuget-for-use-with-github-package-registry#authenticating-to-github-package-registry">https://help.github.com/en/articles/configuring-nuget-for-use-with-...</a><br></li>
<li>Source URL must be in the form <code>https://nuget.pkg.github.com/OWNER/index.json</code></li>
</ol>
<p>Let me know how that worked.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/476448042019-09-30T16:53:57Z2019-09-30T16:53:57ZPush NuGet to GitHub Package Registry<div><p>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.</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/476448042019-09-30T16:55:35Z2019-09-30T16:55:35ZPush NuGet to GitHub Package Registry<div><p>Well, I just did a hard refresh and I see it now. I will give it a try.</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/476448042019-09-30T16:57:30Z2019-09-30T16:57:30ZPush NuGet to GitHub Package Registry<div><p>That worked! Thank you!</p></div>Eric J. Smithtag:help.appveyor.com,2012-11-13:Comment/476448042019-09-30T17:02:42Z2019-09-30T17:02:42ZPush NuGet to GitHub Package Registry<div><p>Cool, thanks for the update!</p></div>Feodor Fitsner