30 lines
1.3 KiB
Text
30 lines
1.3 KiB
Text
|
|
<?xml version="1.0" encoding="utf-8"?>
|
||
|
|
<!--
|
||
|
|
Repository-level NuGet.Config to control which sources are queried for which
|
||
|
|
packages. This prevents the GitLab feed from being queried for all package
|
||
|
|
IDs (which causes 401 errors for packages hosted on nuget.org).
|
||
|
|
|
||
|
|
Usage:
|
||
|
|
- Keep this file in the repository root so `dotnet restore` picks it up by default.
|
||
|
|
- CI still needs to add the `GitLab` source credentials at runtime (we do this
|
||
|
|
from the pipeline using `dotnet nuget add source ...`), but the mapping below
|
||
|
|
ensures only the listed package ID patterns are requested from the GitLab feed.
|
||
|
|
-->
|
||
|
|
<configuration>
|
||
|
|
<packageSources>
|
||
|
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||
|
|
<add key="Nuget-GitLab-AIFotoONLUS" value="https://gitlab.com/api/v4/projects/79509532/packages/nuget/index.json" />
|
||
|
|
</packageSources>
|
||
|
|
|
||
|
|
<!-- Map private package IDs to the GitLab source; everything else uses nuget.org -->
|
||
|
|
<packageSourceMapping>
|
||
|
|
<packageSource key="Nuget-GitLab-AIFotoONLUS">
|
||
|
|
<!-- Add patterns for your private packages hosted in GitLab -->
|
||
|
|
<package pattern="AIFotoONLUS.*" />
|
||
|
|
<package pattern="AIFotoONLUS.Core" />
|
||
|
|
</packageSource>
|
||
|
|
<packageSource key="nuget.org">
|
||
|
|
<package pattern="*" />
|
||
|
|
</packageSource>
|
||
|
|
</packageSourceMapping>
|
||
|
|
</configuration>
|