Authenticate to Azure Repos Using an Authentication Token

45 minutes
  • 3 Learning Objectives

About this Hands-on Lab

You have just created your first Git repo in Azure DevOps and need to clone that repo down to your local machine. You decide the easiest and most secure way to clone the repo is by using an authentication token. After you’ve created the token, push your code to Azure Repos.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create a New Azure DevOps Organization and Project
  • Log in to the Azure portal
  • Search for "Azure DevOps" in the services menu
  • Create a new organization
  • Create a new private project named project1
Create a New Azure Repo
  • From your new Azure DevOps project, click Azure Repos
  • Initialize a new Git Repo
  • Include a README.md and a .gitignore file in your repository
Clone the Repo to the Linux VM
  • Create a Personal Access Token in Azure DevOps
  • Use the method of least privilege (don’t give full access)
  • Use the PAT to clone the repo to the Linux VM

Additional Resources

Use the credentials provided with this lab to log in to the Azure portal, as well as the provided Linux VM (use the syntax ssh cloud_user @ <PUBLIC_IP_ADDRESS>). Create a new DevOps organization, followed by a new Azure DevOps project. Within your new project, go to Azure Repos and initialize a new Git repository. Clone the repository down to the Linux VM, make a small change, and then push your changes to that same Git repo.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?