How to clone a repo from azure devops to a remote machine

JyotiPrakash Mallick 1 Reputation point
2022-01-10T04:01:57.917+00:00

Have a pipleline, one of the steps is to clone a devops repo to 4 remote machines,

For example, I want to clone Repo1 to Remotemachine1,Remotemachine2,Remotemachine3 & Remotemachine4, irrespective of the sequence (it can be anything like sequential or parallel to these machine)

I am using powershell to achieve this task, how can I do it?

Windows for business | Windows Server | User experience | PowerShell
Community Center | Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,926 Reputation points
    2022-01-11T09:25:53.387+00:00

    Hi there,

    Not sure about Powershell but you can achieve this by the Git Credential Manager. Be sure you have the Git Credential Manager or have configured SSH authentication before you continue. You'll need a clone URL to tell Git what repository you want to clone to your computer.

    Use this clone URL with git clone to make a local copy of the repo:
    git clone https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam

    git clone clones the repository from the URL in a folder under the current one. You can specify a folder name after the URL to create the repo in a specific location, for example:
    git clone https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam C:\Repos\FabrikamFiber

    Here are some links to dig more info regarding this
    https://learn.microsoft.com/en-us/azure/devops/repos/git/clone?view=azure-devops&tabs=command-line

    -----------------------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.