[英]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.