{"id":458,"date":"2015-11-21T11:41:01","date_gmt":"2015-11-21T11:41:01","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2015\/11\/21\/how-to-publish-a-nuget-package-in-nuget-gallery\/"},"modified":"2017-12-17T13:28:41","modified_gmt":"2017-12-17T13:28:41","slug":"how-to-publish-a-nuget-package-in-nuget-gallery","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/how-to-publish-a-nuget-package-in-nuget-gallery\/","title":{"rendered":"How to Publish a Nuget package in NuGet Gallery?"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3150 size-full\" src=\"http:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/11\/how-to-publish-a-nuget-pack.png\" alt=\"publish-a-nuget-package-in-nuget-gallery\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2015\/11\/how-to-publish-a-nuget-pack.png 600w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2015\/11\/how-to-publish-a-nuget-pack-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>How to Publish a Nuget package in NuGet Gallery?<\/p>\n<p><strong>Step 1 &#8211; Create an account at NuGet.org<\/strong><\/p>\n<p>Head over to http:\/\/nuget.org\/ and register for an account. Once you do that, click on &#8220;My Account&#8221; to see an API Key that was generated for you.<\/p>\n<p><strong>Step 2 &#8211; In a command console, run the command:<\/strong><\/p>\n<pre><code>$ nuget setApiKey Your-API-Key<\/code><\/pre>\n<p>This will store your API key so that you never need to do this step again on this machine.<\/p>\n<p>Push your package to NuGet Gallery using the command:<\/p>\n<pre><code>$ nuget push YourPackage.nupkg<\/code><\/pre>\n<p><strong> Reference<\/strong><br \/>\n<a href=\"https:\/\/docs.nuget.org\/consume\/command-line-reference\" target=\"_blank\" rel=\"noopener\">https:\/\/docs.nuget.org\/consume\/command-line-reference<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Publish a Nuget package in NuGet Gallery? Step 1 &#8211; Create an account at NuGet.org Head over to http:\/\/nuget.org\/ and register for an account. Once you do that,&#8230; <\/p>\n","protected":false},"author":1,"featured_media":3150,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[1332,1122,545,1335,933,1334,1333,247,1337,593,1331,1338,1336,732,213],"class_list":["post-458","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorised","tag-gallery","tag-guide","tag-how","tag-how-to-publish-nuget-package","tag-nuget","tag-nuget-gallery","tag-nuget-package","tag-package","tag-package-to-nuget-gallery","tag-process","tag-publish","tag-publish-command","tag-publish-the-package-on-the-nuget-gallery","tag-steps","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=458"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/458\/revisions"}],"predecessor-version":[{"id":3301,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/458\/revisions\/3301"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/3150"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}