在Linux(RHEL7)的Nuget.config中配置多个源

问题描述 投票:1回答:1

我正在尝试在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>
.net-core nuget gitlab-ci nuget-package
1个回答
0
投票
在此dotnet nuget之后,还原/构建的过程就像是魅力。
© www.soinside.com 2019 - 2024. All rights reserved.