This is a series of articles related to Source Control or Version Control issues, from the stand-alone apps, such as MS SourceSafe, to Server app, such as MS TFS (Team Foundation Server), to web services such as GitHub, AWS, and MS Azure DevOps. We tried to category this series of articles as Source Control or Version Control, but this site does not have these categories, so we make the articles in Category as DevOps, as explained in the wiki.
DevOps is a set of practices that combines software development (Dev) and IT operations (Ops). It aims to shorten the systems development life cycle and provide continuous delivery with high software quality. DevOps is complementary with Agile software development; several DevOps aspects came from the Agile methodology.
The structure of this article series will cover,
- Stand Alone App:
- Server App
- MS TFS (Team Foundation Server)
- Online (Cloud) Centralized Service:
- MS Azure: DevOps
- Boards
- Repos
- Pipelines
- Test Plans
- Artifacts
- GitHub
- AWS GitHub Enterprise
- Distributed App:
Because these are huge topics, so I will not step by step, instead, I write any section when I feel I am ready for it, but each section will be relatively independent to become a reading unit.
- Source Control (1), MS Source Safe --- Stand Alone App
- Source Control (2), MS TFS --- Centralized Server App
- Source Control (3), MS Azure DevOps (GitHub, Jira) --- Centralized Service
- Source Control (4), Git --- Distributed App
- Source Control (4-1), Git --- Configuration
- Source Control (4-2), Git --- Configured to Connect to DevOps and GitHub
- Source Control (4-3), Git --- Cherry Pick in Visual Studio
- Source Control (4-4), Git --- Recover Git Tree: Reflog/Reset
- Source Control (4-5), Git --- Recover Deleted Branch
- Source Control (4-6), Git --- Revert
- Source Control (4-7), Git --- Get Specific Version or Commit
- Source Control (4-8), Git --- Get Specific Version or Commit in practice
- Source Control (4-9), Git --- Merge: Fetch, Pull, Push and Sync
- Source Control (5), GitHub access (setup connection)
- Source Control (6), DevOps access (setup connection) --- this article
- Source Control (7), GitLab access (setup connection and Clone to Local)
- Source Control (8), Git, Azure Repos, and Visual Studio (Interaction)
- Source Control (9), Push into Git Hub and DevOps
- Source Control (10), Git Hub, DevOps Publish
Introduction
Although the GitHub or DevOps processes are quite complex, I believe the most important thing is setting up the environment, i.e., letting the developer access the working environment. Otherwise, we can do nothing.
I used to plan to make the GitHub and Azure DevOps together under this topic, later on, I realize the contents are a bit too much. Following the SOLID principles of OOP, the first one is The Single Responsibility Principle that states "a class should do one thing", anyway, we will separate the Access to Git Hub into another article, while in this article we only discuss the access for Azure DevOps.
The structure of discussion will be
- A: Register Azure DevOps
- B: DevOps Client Connection Setup
- C: Clone Repos from Server to Local
- From DevOps Server
- From Visual Studio
- Summary
A: Register Azure DevOps
You can open an account for Azure DevOps from Azure DevOps Services if you do not have a Microsoft Azure account yet, otherwise, the Azure account is just for DevOps, because DevOps is part of Microsoft Azure.
For the company account, you do not need to register yourself, you will automatically login by your Windows Credential if DevOps is available for you from your company. However, if you try to login from outside of your security environment, then you will be unable to authenticate.
After you register, you can access Personal GitHub like this,
B: DevOps Client Connection Setup
Now we have server access for Microsoft Azure DevOps from a server or online, how can we access them from the client-side, i.e., your computer? While for Githu.com and Github Enterprise, we have a client-side tool, Github desktop, the client-side default tool for Microsoft Azure DevOps is just Visual Studio, nothing else. Yes, we can also use other third-party tools, such as Visual Studio Code as a client to access DevOps, which we will not discuss in this article.
Use Visual Studio to access DevOps
- Open Visual Studio 2019 as an Administrator.
- Go to Team Explorer and click on the Manage Connections icon ()
- Click on Manage Connections.
- Click on Connect to a Project.
- Check if the DevOps production server is on your list of servers.
- If it is not, click Add Azure DevOps Server.
- Then type your company link, such as https:/tfsprod.reedtech.com/tfs, and click Add.
C: Clone Repos from Server to Local
From DevOps Server, Click Repos,
Click the drop-down box to search the client tool that can do the job Clone,
Choose Visual Studio,
Click the button, choose: Open Microsoft Visual Studio Web Protocol Handler Selector, then choose Visual Studio 2019, you got a prompt for security,
Giving user email in Microsoft,
Giving password to pass the security checking,
giving the path, click the button: Clone, we have the repository cloned in local,
In Solution Explorer,
We could choose another tool to do the job, but usually, we use Visual Studio. The discussion below shows the direct use of Visual Studio.
From Visual Studio
Go to Visual Studio Team Explorer window,
Click the Manage Connections icon,
Click Manage Connections => Connect to a Project.
In opened Connection to a Project window,
Select the project you want to clone, setup the Path, and click the button: Clone.
Summary
This article discussed access to Microsoft Azure DevOps, it follows the pattern of Source Control (5), GitHub access (setup connection) exactly, that is access to GitHub.com and Enterprise GitHub, for the purpose of easy for the reader to read and easy for the writer to write.
Reference