This is a step by step guide to cloning your repository from Azure DevOps into your local machine.
It is a part of a series of simple to follow guides on simplifying and automating software development using Azure DevOps.
This article is a continuation of a previous article on setting up an MVP project on Azure DevOps, if you haven’t already, follow the steps in this article ‘Example Project Setup’ first. In the previous article, we learned how to import a Github repository into Azure DevOps project. We stopped at the point when we have successfully imported the files into our project. (Image 1)
The first step to cloning our files from Azure is to create a Personal Access Token. As a good habit, always use token access and never use actual login/password combinations for authentication whenever possible.
With Personal Access Tokens, it is easier to control the scope and expiry as well as revoking and renewing tokens. So let’s create a Personal Access Token first.
From your project file repository, click on the ‘Clone’ button at the top right corner, and click on ‘Create a Personal Access Token’. (Image 2)
You can also access the page by going to your User Settings, look for the Personal Access Tokens menu on the left.
When you see the Personal Access Token menu, click on ‘New Token’. (Image 3).
Put a name for your token and set the expiry to 30 days. Uncheck all the scopes except for ‘Code’. For this example, set the code access to ‘Full’. Click ‘Create’ once you are satisfied with the scope settings. (Image 4)
Once you click ‘Create’, a personal access token will be created for you. At the success page, remember to copy the token. This is the only time the token will appear. (Image 5) Note: In the event, you closed the window too fast, not to worry, just delete the token and create a new one. Remember to copy the token this time!
Now that we have our Personal Access Token, it’s time to use it to clone to our local machine!
In the next article ‘Cloning a Repo to your local machine’