Cloning a Repository
When you have a Git repository on Azure DevOps (or anywhere else), it exists as a remote repository. You can clone your repository to create a local copy on your computer and sync between the two locations.
To clone a repository in Azure DevOps, for the first time, use the following steps:
Generate PAT
Azure DevOps requires that you authenticate when cloning a repository using either a Personal Access Token (PAT) or SSH. The easiest method is to use a PAT, but docs on using SSH can be found here.
- Navigate to the Azure DevOps project
- Click the "Repos" menu item from the left side menu
- Select "Files"
- In the last breadcrumb in the top bar, select the desired Git repository
- Click the "Clone" button in the upper right corner of the files panel
- Click the "Generate Git Credentials" button
- Save the "Password" (known as a Personal Access Token or "PAT") to your password manager
- Copy the Git HTTPS URL value to the clipboard
- Clone the repository
Clone Repository
tip
Ensure you have Git installed
Option 1) Clone using VS Code
- Click the "Clone in VS Code" button and follow the prompts
Option 2) Clone using command line
- Open a Powershell or command line terminal
- Navigate to the location where you want to clone the repository
- ex:
cd C:/Workspace
(Windows) orcd ~/Workspace
(MacOS)
- ex:
- Enter command to clone repo
git clone https://YOUR_REPOSITORY_URL
# ex: git clone https://rizing-devops@dev.azure.com/rizing-devops/rizing/_git/monorepo - The repository is now available