简体   繁体   English

从 azure devops 管道任务执行 git 克隆时出错

[英]Error performing git clone from azure devops pipeline task

I have a problem executing a pipeline in azure devops.我在 azure devops 中执行管道时遇到问题。 This task is part of my pipeline, as you can see it is an instruction to clone a repository.此任务是我的管道的一部分,您可以看到它是克隆存储库的指令。

- script: |   
    mkdir FOLDER_PUBLISH_AZURE
    git clone https://$(AZURE_DEPLOY_USERNAME):$env:MY_AZURE_DEPLOY_PASSWORD@develroomlabs-events.scm.azurewebsites.net:443/develroomlabs-events.git FOLDER_PUBLISH_AZURE
  workingDirectory: '$(System.DefaultWorkingDirectory)'
  displayName: 'Download SCM repo for pipeline '
  env:
    MY_AZURE_DEPLOY_PASSWORD: $(AZURE_DEPLOY_PASSWORD)

The result I get is as follows:我得到的结果如下:

在此处输入图像描述

But the pipeline variables are well added, I did a test by directly adding username and password in the YAML file, but the result was the same.但是管道变量添加的很好,我做了一个测试,直接在YAML文件中添加用户名和密码,结果还是一样。 What could be happening?会发生什么? Am I doing something wrong?难道我做错了什么?

I do this same task of cloning a repository from a bitbucket pipeline and I have no problems.我执行从 bitbucket 管道克隆存储库的相同任务,我没有问题。

Try doing that in Windows environment with Microsoft-hosted windows agents instead of Micorosft-hosted Linux agents .尝试在 Windows 环境中使用Microsoft 托管的 windows 代理而不是 Microsoft 托管的 Linux 代理来执行此操作

I can reproduce same issue when using Linux environment, but it actually works well in windows environment.我可以在使用 Linux 环境时重现同样的问题,但它实际上在 windows 环境中运行良好。 I think this issue could be related to that Linux has different behavior when treating url format like https://$AppName:xxx@sAppName.scm.azurewebsites.net:443/AppName.git ... I think this issue could be related to that Linux has different behavior when treating url format like https://$AppName:xxx@sAppName.scm.azurewebsites.net:443/AppName.git ...

(Something looks like this ticket ,the behavior should have something to do with Linux server itself) (有点像这张票,行为应该与Linux服务器本身有关)

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

相关问题 Azure Devops 管道运行使 Git 错误? - Azure Devops Pipeline Run makes Git Error? 使用 git clone 命令从 azure devops 检出多个存储库时出错 - Error in checking out multiple repository from azure devops using git clone command Azure devops 管道任务错误:Measure-Command 调用失败 - Azure devops pipeline task error : Measure-Command invocation fails Azure DevOps 管道 CMD 任务 [错误] 访问被拒绝 - Azure DevOps Pipeline CMD task [error]Access is denied 从另一个 Azure DevOps Git 存储库运行 YAML 管道 - Run the YAML pipeline from another Azure DevOps Git repository 在 azure devops 中选择发布管道中的任务 - selection of task in release pipeline in azure devops Azure DevOps - 恢复数据库的管道发布任务 - Azure DevOps - Pipeline Release Task to Restore Database 从另一个管道触发 Azure Devops 管道 - Triggering an Azure Devops pipeline from another pipeline 从另一个管道触发 Azure DevOps 管道 - Trigger Azure DevOps pipeline from another pipeline Azure DevOps 错误“Git fetch failed with exit code 128”在其他 git 存储库的构建管道期间 - Azure DevOps error 'Git fetch failed with exit code 128' during build pipeline of other git Repository
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM