Azure DOTNET还原失败,因为提要认为PAT是加密的Api密钥
当我尝试在Azure DevOps中运行以下步骤时,我看到第一个包的恢复出现错误。当我删除第一个凭证时,它从第二个提要中恢复而没有问题,因此问题似乎是第一个提要的问题Azure DOTNET还原失败,因为提要认为PAT是加密的Api密钥,azure,api,encryption,key,restore,Azure,Api,Encryption,Key,Restore,当我尝试在Azure DevOps中运行以下步骤时,我看到第一个包的恢复出现错误。当我删除第一个凭证时,它从第二个提要中恢复而没有问题,因此问题似乎是第一个提要的问题 steps: - task: DotNetCoreCLI@2 displayName: Restore inputs: command: restore projects: '$(Parameters.RestoreBuildProjects)' feedsToUse: config nug
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '$(Parameters.RestoreBuildProjects)'
feedsToUse: config
nugetConfigPath: nuget.config
externalFeedCredentials: 'FirstCredential, SecondCredential'
ERROR
Using authentication information for the following URI: https://pkgs.dev.azure.com/xxxxxxxxxx/_packaging/xxxxxxxxxxxxx/nuget/v3/index.json
##[error]Error: DotNetCore currently does not support using an encrypted Api Key.
##[error]Packages failed to restore
我以前知道,当使用dotnet CLI将NuGet软件包发布到经过身份验证的源时,我需要使用
--以明文形式存储密码
标志(看起来很令人担忧)。有更多的文档可用
您可以尝试在您的参数
输入中传递上述标志,但我不能保证它会起作用
如果做不到这一点,您可能需要创建一个服务连接并引用它的名称,而不是在externalFeedCredentials
属性中提供用户名和密码