Skip to content

Instantly share code, notes, and snippets.

@Red-Folder
Last active July 31, 2024 09:28
Show Gist options
  • Save Red-Folder/34056d8115eb839f27b427a06cdea313 to your computer and use it in GitHub Desktop.
Save Red-Folder/34056d8115eb839f27b427a06cdea313 to your computer and use it in GitHub Desktop.
Sample nuget.config to show how to add personal nuget server
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="NAME" value="FEEDURL" />
<add key="NuGet official package source" value="https://nuget.org/api/v2/" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>
@honeyankit
Copy link

honeyankit commented Oct 5, 2022

This is how you add credentials to the nuget.config for private registry name example-nuget hosted in bytesafe.dev:

<?xml version="1.0" encoding="utf-8"?>
</configuration>
  <packageSources>
    <clear />
    <add key="example-nuget" value="https://test.bytesafe.dev/nuget/example-nuget/index.json" />
  </packageSources>
  <packageSourceCredentials>
    <example-nuget>
      <add key="Username" value="bytesafe" />
      <add key="Password" value="xxyyzzzz" />
    </example-nuget>
  </packageSourceCredentials>
    <apikeys>
      <add key="https://test.bytesafe.dev/nuget/example-nuget/index.json" value="xxyyzzzz" />
      </apikeys>
  <disabledPackageSources>
    <add key="nuget.org" value="true" />
  </disabledPackageSources>
</configuration>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment