Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure DOTNET还原失败,因为提要认为PAT是加密的Api密钥_Azure_Api_Encryption_Key_Restore - Fatal编程技术网

Azure DOTNET还原失败,因为提要认为PAT是加密的Api密钥

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

当我尝试在Azure DevOps中运行以下步骤时,我看到第一个包的恢复出现错误。当我删除第一个凭证时,它从第二个提要中恢复而没有问题,因此问题似乎是第一个提要的问题

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
属性中提供用户名和密码