.NET and NuGet
Set up dotnet
Point dotnet, nuget.exe and Visual Studio at the ForgeRepo™ NuGet feed.
The ForgeRepo™ NuGet feed is at https://packages.example.com/nuget/v3/index.json. Put a nuget.config next to your solution with the feed and your token:
$ cat nuget.config <?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <clear /> <add key="company" value="https://packages.example.com/nuget/v3/index.json" /> </packageSources> <packageSourceCredentials> <company> <add key="Username" value="your-user-name" /> <add key="ClearTextPassword" value="%REPO_TOKEN%" /> </company> </packageSourceCredentials> </configuration> $ dotnet nuget list source Registered Sources: 1. company [Enabled] https://packages.example.com/nuget/v3/index.json
Captured by running these commands against a real ForgeRepo™.
<clear />removes nuget.org, so every package comes through packages.example.com and its checks.%REPO_TOKEN%is read from the environment, so the token itself never goes into the repository.- Visual Studio reads the same
nuget.config. Search is not offered by the feed yet, so the Browse tab finds nothing here. Add packages by name.