【发布时间】:2019-01-25 09:41:31
【问题描述】:
当我执行发布管道时,我有一个 Powershell 任务,但它说该目录不是 git 存储库,我尝试使用发布管道变量,但它似乎不起作用。
try
{
"Initiated"
Set-Location "$(System.ArtifactsDirectory)"
git remote add target https://maliranguesnunezcontractor@dev.azure.com/maliranguesnunezcontractor/PDemo/_git/PDemo
"Added target"
}
catch [System.Management.Automation.CommandNotFoundException]
{
"Error"
}
【问题讨论】:
-
如果我理解正确,那么您只是试图从 Powershell 访问 git。剧本至少说明了这一点。参考THIS
-
你能分享你的错误日志吗?你是使用内联 PowerShell 还是从文件中使用 PowerShell?
标签: git powershell azure-devops azure-pipelines