Source Control (5), Git Hub Access (Setup Connection)

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:
    • MS Source Safe
  • 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:
    • Git

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.

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 DevOps into another article, while in this article we only discuss the access for GitHub (and Enterprise)..

The structure of discussion will be

  • A: Register GitHub
  • B: GitHub Client Connection Setup
    • Desktop
    • Visual Studio
  • C: Clone Repos from Server to Local
    • From GitHub Server
      • Open with GitHub Desktop
      • Open with Visual Studio
      • Download ZIP
    • From GitHub Desktop
      • URL
      • GitHub
      • GitHub Enterprise
    • From Visual Studio
      • GitHub
      • GitHub Enterprise
  • Summary

A: Register GitHub

You can open an account for GitHub from GitHub, and following the instruction of Signing up for a new GitHub account.

For the company account, i.e., the GitHub Enterprise, you do not need to register yourself, you will automatically login by your Windows Credential if GitHub Enterprise 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,

and Company GitHub Enterprise,

B: GitHub Client Connection Setup

Now we have server access for GitHub and GitHub Enterprise, how can we access them from client-side, i.e., your computer? We can do that through,

  • GitHub Desktop
  • Visual Studio
  • Visual Studio Code 
  • other tools

Here, we only discuss using GitHub Desktop and Visual Studio which are two popular tools developers use.

GitHub Desktop

From GitHub Desktop: File => Options,

We got,

Click Sign in,

You prompt Sign in with Browser Window, then Continue,

Login with your username/password,

 

Visual Studio

In Visual Studio, from Team Explore Window,

Click Connect => Manage Connections => Connect to GitHub,

Click Sign in with your browser,

You will get login (the GitHub Enterprise is the same, we will not repeat),

Note:

In certain situation, we cannot see the Connect to GitHub, probably by settings, like this:

instead, we have this, without "Connect to GitHub":

We will discuss this situation in Source Control (5-1), Create a Git Hub Repository from Visual Studio.

C: Clone Repos from Server to Local
 

From GitHub Server

From any GitHub project,

Click Code,

Open with GitHub Desktop,

Click Open GitHubDesktop,

Click the Clone button to finish.

Open with Visual Studio,

Click Open Microsoft Visual Studio Web Protocol Handler Selector,

Click the Clone button to finish.

Download ZIP is straightforward.

From GitHub Desktop

Click: File =>Clone repository

We got the Clone a repository window,

We can switch from URL to GitHub.com,

To GitHub Enterprise,

From Visual Studio

Click Clone from either GitHub or GitHub Enterprise from Visual Studio Team Explorer,

then you can clone from there,

Switch between GitHub and GitHub Enterprise,

Summary

This article discussed access to GitHub and Enterprise GitHub. It used to include the MS Azure DevOps content, due to it is quite different, and the staff in this article is too much, then we decide to make another article for that topic, while this article concentrate on GitHub and Enterprise GitHub, they are basically the same in behavior.

Client-side tool, we discussed GitHub Desktop and Visual Studio, and actually, one can make the integration between GitHub and other tools, such as Visual Studio Code. For example, when you try to open a repos from GitHub Server, and choose open by Visual Studio, you might have a chance to choose an application such as,

or,

And you can hook GitHub with Visual Studio Code by GitHub Extension for Visual Studio,

We might discuss the details in another article.

Reference


Similar Articles