我正在尝试配置Azure Artifacts Credential Provider,以便让我连接到Azure DevOps并将NuGet软件包发布到Artifacts feed。我已在我的构建服务器上安装了凭据提供程序。但是每次运行构建时,我都会收到以下错误:
我应该向凭证提供程序传递PAT,还是正在运行构建的帐户需要访问Azure DevOps以生成凭据?对于这个问题,文档给我的解释不太清楚。我的TeamCity实例有点过时,也许我需要先升级它。我正在尝试配置Azure Artifacts Credential Provider,以便让我连接到Azure DevOps并将NuGet软件包发布到Artifacts feed。我已在我的构建服务器上安装了凭据提供程序。但是每次运行构建时,我都会收到以下错误:
我应该向凭证提供程序传递PAT,还是正在运行构建的帐户需要访问Azure DevOps以生成凭据?对于这个问题,文档给我的解释不太清楚。我的TeamCity实例有点过时,也许我需要先升级它。被接受的答案似乎已经不再起作用。 在运行在Windows Server 2016上且使用.NET Core 2.2.105的TeamCity 2019.1.4中:
[push] WARNING: The credential plugin model used by 'C:\TeamCity\buildAgent\plugins\nuget-agent\bin\credential-provider\CredentialProvider.TeamCity.exe' is deprecated. Please contact the provider of the plugin for an alternative. More information about the recommended plugin model can be found at 'https://aka.ms/nuget-cross-platform-authentication-plugin'.
[17:18:31][push] Please provide credentials for: https://pkgs.dev.azure.com/org/project/_packaging/feed/nuget/v3/index.json
[17:18:31][push] Unable to load the service index for source https://pkgs.dev.azure.com/org/project/_packaging/feed/nuget/v3/index.json.
[17:18:31][push] Response status code does not indicate success: 401 (Unauthorized).
如果我登录到服务器并设置非交互式使用的环境变量,则手动安装和运行 https://github.com/microsoft/artifacts-credprovider 可以从命令行工作,但在 TeamCity 构建作业上下文中不起作用。
是否有更新的 TeamCity 运行程序可以处理向 Azure Artifacts 推送 dotnet nuget 的身份验证?