-1

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.

3 Answers3

1

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.

Sam Cogan
  • 4,124
  • 7
  • 44
  • 76
1

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:

enter image description here

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.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
0

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.

Rajat Arora
  • 582
  • 1
  • 6
  • 18
  • We have ssh and https address under the clone repository tab.Can I use the https address? –  Nov 18 '19 at 12:45
  • you cannot use any of those URLs. That's to clone the git repo. For that, you need Git to be installed in the system. Either you should install git which is preferred way so that you are also able to push your local changes afterward. Else if your motive is just to download the changes without git then get the URL from "Advanced tools" in your web app in the Azure portal. See the link I posted after you are in the advanced tools section. – Rajat Arora Nov 18 '19 at 12:51
  • I am not using a Azure web apps.. I am using azure devops. My url is dev.azure.com/my_organization_name. –  Nov 18 '19 at 13:29
  • what ever user name and password that I give, curl doesn't respect that. –  Nov 19 '19 at 09:13