<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rian Drake on Medium]]></title>
        <description><![CDATA[Stories by Rian Drake on Medium]]></description>
        <link>https://medium.com/@riandrake?source=rss-c3fb26cefd9d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mYzdtovoofxO0ruJQl_R-g.jpeg</url>
            <title>Stories by Rian Drake on Medium</title>
            <link>https://medium.com/@riandrake?source=rss-c3fb26cefd9d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 10:51:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@riandrake/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Connect to a Private NuGet Feed on GitHub]]></title>
            <link>https://medium.com/@riandrake/connect-to-a-private-nuget-feed-on-github-fccab5802203?source=rss-c3fb26cefd9d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fccab5802203</guid>
            <category><![CDATA[nuget]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[authentication]]></category>
            <dc:creator><![CDATA[Rian Drake]]></dc:creator>
            <pubDate>Wed, 20 Aug 2025 22:20:05 GMT</pubDate>
            <atom:updated>2025-08-20T22:20:05.755Z</atom:updated>
            <content:encoded><![CDATA[<p>You’re here because your .NET project is consuming a <a href="https://www.nuget.org/">NuGet</a> package hosted on GitHub, but the feed is private so your onboarding team said you needed to set up access to it on your machine and they don’t have any documentation for you.</p><p>You could start by looking at the <a href="https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry">official documentation</a> from GitHub — which I recommend if anything goes wrong for you here — but it contains a lot of info that’s probably not relevant to you, so here I will try and boil it down to the steps you need to worry about in order to get rolling with your project.</p><p>First, let’s start with the prerequisites.</p><h3>Prerequisite #1: Access To GitHub</h3><p>I hope you’ve done this part already, if not you should probably stop here and go talk to your local IT professional. But if you’re able to sign into <a href="https://github.com/">GitHub</a>, and you have access to your repository/organization, you’re probably good to go!</p><h3>Prerequisite #2: .NET Is Installed</h3><p>To check you have <a href="https://dotnet.microsoft.com/en-us/download">.NET</a> installed, you can try run this in your terminal:</p><pre>dotnet</pre><p>If it’s working, you should see something like this:</p><pre>&gt; dotnet<br><br>Usage: dotnet [path-to-application]<br>Usage: dotnet [commands]<br><br>path-to-application:<br>  The path to an application .dll file to execute.<br><br>commands:<br>  -h|--help                         Display help.<br>  --info                            Display .NET information.<br>  --list-runtimes [--arch &lt;arch&gt;]   Display the installed runtimes matching the host or specified architecture. Example architectures: arm64, x64, x86.<br>  --list-sdks [--arch &lt;arch&gt;]       Display the installed SDKs matching the host or specified architecture. Example architectures: arm64, x64, x86.</pre><p>Now, let’s move on to the actual steps to setting up access to the NuGet feed!</p><h3>Step #1: Creating a PAT (Personal Access Token) on GitHub</h3><p>(<a href="https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic">source</a>)</p><p>The PAT is what you need to access packages hosted on GitHub. In this step, we will be creating a token that gives you read-only access to those packages.</p><ol><li>Visit the <a href="https://github.com/settings/apps">Developer Settings</a> page on GitHub</li><li>Navigate to “Personal access tokens” &gt; “Tokens (classic)”</li><li>Click “Generate new token” &gt; “Generate new token (classic)”</li><li>Ensure read:packages is checked, then set the “Note” and “Expiration” fields to what works for you</li><li>Click “Generate token”</li><li>Copy the token somewhere safe like NotePad before moving ahead of the next step</li></ol><h3>Step #2: Add the Private NuGet Feed to your list of NuGet Sources</h3><p>(<a href="https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry#authenticating-in-a-github-actions-workflow">source</a>)</p><p>First, paste this command template into NotePad:</p><pre>dotnet nuget add source https://nuget.pkg.github.com/NAMESPACE/index.json -n NAME -u USERNAME -p TOKEN --store-password-in-clear-text</pre><p>You will need to replace the following keys:</p><ul><li>NAMESPACE is the name of the personal account or organization to which your packages are scoped.</li><li>NAME is the name you want to give to this source, just to make it clear what you added it for.</li><li>USERNAME is the username to be used when connecting to an authenticated source.</li><li>TOKEN is the text you copied when creating your PAT in the previous step.</li></ul><p>Now, copy the completed command and run it in your terminal! It doesn’t matter where you do it. You should see this in your output:</p><pre>&gt; dotnet nuget add source https://nuget.pkg.github.com/MyNamespace/index.json -n MyName -u user.name -p ghp_asdfghjkl --store-password-in-clear-text<br><br>Package source with Name: MyName added successfully.</pre><h3>Final Checks</h3><p>At this point, you should be good to go! But if you want to double check, you can run this command to confirm the source was added:</p><pre>dotnet nuget list source</pre><p>You should see this:</p><pre>&gt; dotnet nuget list source<br><br>Registered Sources:<br>  1.  nuget.org [Enabled]<br>      https://api.nuget.org/v3/index.json<br>  2.  NAME [Enabled]<br>      https://nuget.pkg.github.com/NAMESPACE/index.json</pre><p>… whereNAME is the name of the new NuGet source you’ve just added.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fccab5802203" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>