How to clone a repo from azure through command line without using git commands

▼魔方 西西 提交于 2019-12-11 17:38:22

问题


I want to clone project from azure through command prompt but I don't to use git commands. I tried using curl but didn't work.

curl https://azure.com/project private-token:asdadad45457547 --output "foldername.zip"

Please suggest some way to do.

Thanks in advance.


回答1:


If you are using Azure web app, you can download your source code using Curl:

curl -o ./sourceCode.zip -u "username:password" "https://test.scm.azurewebsites.net/api/zip/site/wwwroot/"

This will download you with the zip file for your project which you can later extract. Please see this to get the right URL for you. As shown in this link, you can navigate to the kudu console and just get the URL by right-clicking the download button and copy the link to that specific folder which you want to download.




回答2:


You can't clone a project. You can clone a repo in that project, but the URL will need to reference the repo, not just the top level project.




回答3:


How to clone a repo from azure through command line without using git commands

If you are using azure devops, you can click on any ellipsis to find the menu which contains Download as Zip option:

If you want a automated way, suggest you use the REST API with Powershell, check the similar thread for some more details.

Hope this helps.



来源:https://stackoverflow.com/questions/58913315/how-to-clone-a-repo-from-azure-through-command-line-without-using-git-commands

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!