简体   繁体   English

VSTS 将 Key Vault 证书导入到 HostedVS 构建中的文件

[英]VSTS import Key Vault Certificate to a file on HostedVS build

How can I import certificates from Key Vault to a folder on HostedVS17?如何将证书从 Key Vault 导入到 HostedVS17 上的文件夹?

Currently, I have a key Vault task that accesses all the certificates.目前,我有一个访问所有证书的密钥保管库任务。 How can I import them to a temp folder for subsequent task scripts to execute?如何将它们导入临时文件夹以供后续任务脚本执行? I am using HostedVS2017我正在使用 HostedVS2017

can add two tasks to import certificates from Key Vault into files.可以添加两个任务将证书从 Key Vault 导入文件。 Detail steps as below:详细步骤如下:

  1. Add an Azure Key Vault task to specify the key vault you want to download添加Azure Key Vault 任务以指定要下载的Key Vault
  2. Add a PowerShell task to import certificates into files添加PowerShell 任务以将证书导入文件

    Assume there has a certificate with the name cer1 in your key vault, then you can use the powershell script echo $(cer1) > myfile to import it into the file myfile .假设您的密钥保管库中有一个名为cer1的证书,那么您可以使用 powershell 脚本echo $(cer1) > myfile将其导入文件myfile

Besides, you can use the certificates as variables directly.此外,您可以直接将证书用作变量 As above example, you can use the variable $(cer1) directly.如上例,您可以直接使用变量$(cer1)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 powershell 将 Azure 密钥保管库证书导入应用服务? - Import Azure key vault certificate to app service using powershell? Azure Key Vault 下载带有私钥的证书 - Azure Key Vault download certificate with private key Key Vault中的Azure证书不适用于应用程序服务 - Azure certificate in Key Vault not valid for app service 更新存储在 Azure Key Vault 中的证书的最佳替代方法是什么? - What is the best alternative to renew a certificate stored in Azure Key Vault? 将 SSL 证书从 Azure 密钥保管库检索到 Azure 应用服务 - Retrieving SSL certificate from Azure key vault to Azure app service 如何使用Powershell和证书身份验证获取Azure Key Vault机密? - How to get Azure Key Vault secret using powershell with certificate auth? 如何使用 powershell 获取 Azure 密钥保管库证书激活日期 - How to Get the Azure key vault certificate activation date using powershell 在 powershell 中使用 Import-PfxCertificate 命令安装证书 pfx 文件时找不到私钥 - private key not found while certificate pfx file installed with Import-PfxCertificate command in powershell 调用PhantomJS的自定义VSTS构建任务无法创建映像文件 - Custom VSTS Build Task to Call PhantomJS Fails to Create Image File Azure - Key Vault 中的应用服务证书为空白 - 无法使用 powershell / az cli 下载 pfx - Azure - App Service Certificate in Key Vault is blank - Unable to download the pfx using powershell / az cli
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM