我正在尝试在nuget.config中配置多个Nuget源。 Nuget.config已添加到项目的根目录。使用相同的配置,我可以在Macbook上成功dotnet build
我的应用程序,但是当我在linux中运行相同的配置时,出现以下错误。
/opt/rh/rh-dotnet31/root/usr/lib64/dotnet/sdk/3.1.100/NuGet.targets(123,5): error : Unable to load the service index for source https://gitlab.xxxyy.gov/api/v4/projects/id/packages/nuget/index.json [/var/www/folder/member/Member.sln]
/opt/rh/rh-dotnet31/root/usr/lib64/dotnet/sdk/3.1.100/NuGet.targets(123,5): error : Response status code does not indicate success: 401 (Unauthorized). [/var/www/netcoreapp3.1/member/Member.sln]
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="gitlab" value="https://gitlab.senate.gov/api/v4/projects/449/packages/nuget/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageSourceCredentials>
<gitlab>
<add key="Username" value="xyz" />
<add key="ClearTextPassword" value="dhdhdhdh" />
</gitlab>
</packageSourceCredentials>
</configuration>