Menu

Log in

Sign up

From beginner to master of web design, coding, infrastructure operation, business development and marketing

  • COURSES
  • HTML & CSS Introduction
  • HTML & CSS Coding with AI
  • Linux Introduction
  • Docker Basics
  • Git & GitHub Introduction
  • JavaScript Coding with AI
  • Django Introduction
  • AWS Basics
  • Figma Introduction
  • SEO Tutorial for Beginners
  • SEO with AI
  • OTHERS
  • About
  • Terms of Service
  • Privacy Policy

© 2024 D-Libro. All Rights Reserved

Git & GitHub IntroductionChapter 2. Git & GitHub Initial Settings

Generating PAT (Personal Access Token)

Generating PAT (Personal Access Token)

Generating Personal Access Tokens (PAT)

To establish HTTPS connection, you’ll need PAT (Personal Access Token). There are two types of PAT: Tokens (classic) and Fine-grained tokens (beta version as of 2023 September). When you use the Fine-grained tokens, you can add more detail settings. For the beginner practice purposes, we'll explain how to set up PAT using the classic one.

1. Log into GitHub and go to user settings

Go to the GitHub website (GitHub), click on your icon, and press the Settings button.

Generating PAT (Personal Access Token): Step 1

2. Move to Developer Settings page

Go to the bottom of the left sidebar and select Developer settings.

Generating PAT (Personal Access Token): Step 2

3. Generate a new token

Select Tokens (classic) under Personal access tokens and press the Generate new token button. Select Generate new token (classic).

Generating PAT (Personal Access Token): Step 3

Add Note (describe what the token is for) and set Expiration. After the token expires, you need to generate another token.

In the Select scopes section, you need to check repo to get access to your Private Remote Repositories. You can add other scopes later when required.

Generating PAT (Personal Access Token): Step 4

Press the Generate token button.

Generating PAT (Personal Access Token): Step 5

When a new token is successfully generated, you’ll see your PAT. Make sure you’ll copy it and save it somewhere as it won't be shown again.

Generating PAT (Personal Access Token): Step 6

When PAT is used?

PAT is used when you establish an HTTPS connection to your Remote Repository. To establish HTTPS connections going forward, go to your repository on GitHub and press the Code button. Make sure to select the HTTPS tab to get the URL for HTTPS. (the URL for SSH is different). This URL is used when you run the clone, push, or pull command.

GitHub HTTPS connection

When you clone, push, or pull, you’ll be asked for your username and password. You need to use PAT instead of the GitHub password. Previously, it was a GitHub password, however, GitHub changed the rule to strengthen the security level. How to establish an HTTPS connection will be explained in the later chapters along with the key git commands: git clone, git remote, git push, and git pull.


You can also learn this topic offline. Click AmazonKindle.

More Topics to Explore

Exploring Linux Services

What Is Service on Linux?

How to Use Branch Management in Git Workflow

Git Regular Workflow – Work With Branches

Other File Transfer Commands in Linux

Other File Transfer Commands

Deleting Text in Vim Editor Normal Mode

Normal Mode (2) – Delete

Docker Container Lifecycle

Docker Container Lifecycle

Exploring Linux Services

What Is Service on Linux?

How to Use Branch Management in Git Workflow

Git Regular Workflow – Work With Branches

Other File Transfer Commands in Linux

Other File Transfer Commands

Deleting Text in Vim Editor Normal Mode

Normal Mode (2) – Delete

Docker Container Lifecycle

Docker Container Lifecycle

Tags:

HTTPS

PAT

Personal Access Token

Git & GitHub Introduction
Course Content

Chapter 1. Git & GitHub Overview

What Is Git?

What Is Version Control?

How To Save Versions in Git?

Collaborating on Git & GitHub – Remote Repository

Collaborating on Git & Git Hub – Branch

Git & GitHub Basic Life Cycle

Chapter 2. Git & GitHub Initial Settings

Git & GitHub Initial Settings Overview

Key Tool Preparation (1) – Mac

Key Tool Preparation (2) – Windows

Key Tool Preparation (3) – Linux Remote Server

Git User Settings – git config

Create GitHub Account

GitHub Access Authentication Settings

Generating PAT (Personal Access Token)

GitHub SSH Setup

Chapter 3. Git & GitHub Project Setup

Three Cases in Git & GitHub Project Setup

Git & GitHub Project Setup Overview in Different Cases

Building Remote Collaboration Practice Environment

Project Initiator – Key Steps To Launch Git Project

Project Initiator – Create Local Repository (git init)

Project Initiator – Make the First Commit

Project Initiator – .gitignore File

Project Initiator – Create Remote Repository

Project Initiator – Link Between Remote and Local Repositories (git remote add)

Project Initiator – Upload Local Repository to Remote Repository (git push)

Project Initiator – Grant Remote Repository Access to Project Members

Project Member – Start Project As Collaborator

Project Member – Create Copy of Project Code on Local Computer (git clone)

Non-Member – Start Project With Replica of Existing Repository (Fork)

Fork vs. Clone

Chapter 4. Edit & Commit

Git Regular Workflow – Edit & Commit

Edit and Commit Overview (1)

Add Files to Staging Area – git add

Commit Files – git commit

HEAD and INDEX

Check Status of Working Tree and Staging Area – git status

Check Commit Histories – git log

Check Differences – git diff

Restore Files to Working Tree – git restore

Undo Changes – git reset

Delete Files – git rm

Edit and Commit Overview (2)

Chapter 5. Work With Branches

Git Regular Workflow – Work With Branches

What Is Branch?

Branch Operation Basic Life Cycle

Create Branch and Check Branch Status – Git Branch

Switch Current Branch (1) – Git Checkout

Switch Current Branch (2) – Git Switch

Merge Branches – Git Merge

Fast-Forward Merge

Non-Fast-Forward Merge (No Option)

Non-Fast-Forward Merge (--no-ff Option)

Squash Merge

Rebase Branch – Git Rebase

Managing Conflict

Stash Changes – Git Stash

Chapter 6. Remote Collaboration

Git Regular Workflow – Remote Collaboration

Remote Collaboration Overview

Link With Remote Repository – Git Remote

Upload to Remote Repository – Git Push

Download Remote Repository and Merge to Local Repository – Git Pull

Get Remote Repository Information to Local Repository – Git Fetch

Pull vs. Fetch

Request for Review and Merge – Pull Request

Merge Operation Using GitHub

Chapter 7. Supplemental Topics

Git Key Commands and GitHub Key Features

Git & GitHub Glossary

GitHub Other Features

Chapter 1. Git & GitHub Overview

What Is Git?

What Is Version Control?

How To Save Versions in Git?

Collaborating on Git & GitHub – Remote Repository

Collaborating on Git & Git Hub – Branch

Git & GitHub Basic Life Cycle

Chapter 2. Git & GitHub Initial Settings

Git & GitHub Initial Settings Overview

Key Tool Preparation (1) – Mac

Key Tool Preparation (2) – Windows

Key Tool Preparation (3) – Linux Remote Server

Git User Settings – git config

Create GitHub Account

GitHub Access Authentication Settings

Generating PAT (Personal Access Token)

GitHub SSH Setup

Chapter 3. Git & GitHub Project Setup

Three Cases in Git & GitHub Project Setup

Git & GitHub Project Setup Overview in Different Cases

Building Remote Collaboration Practice Environment

Project Initiator – Key Steps To Launch Git Project

Project Initiator – Create Local Repository (git init)

Project Initiator – Make the First Commit

Project Initiator – .gitignore File

Project Initiator – Create Remote Repository

Project Initiator – Link Between Remote and Local Repositories (git remote add)

Project Initiator – Upload Local Repository to Remote Repository (git push)

Project Initiator – Grant Remote Repository Access to Project Members

Project Member – Start Project As Collaborator

Project Member – Create Copy of Project Code on Local Computer (git clone)

Non-Member – Start Project With Replica of Existing Repository (Fork)

Fork vs. Clone

Chapter 4. Edit & Commit

Git Regular Workflow – Edit & Commit

Edit and Commit Overview (1)

Add Files to Staging Area – git add

Commit Files – git commit

HEAD and INDEX

Check Status of Working Tree and Staging Area – git status

Check Commit Histories – git log

Check Differences – git diff

Restore Files to Working Tree – git restore

Undo Changes – git reset

Delete Files – git rm

Edit and Commit Overview (2)

Chapter 5. Work With Branches

Git Regular Workflow – Work With Branches

What Is Branch?

Branch Operation Basic Life Cycle

Create Branch and Check Branch Status – Git Branch

Switch Current Branch (1) – Git Checkout

Switch Current Branch (2) – Git Switch

Merge Branches – Git Merge

Fast-Forward Merge

Non-Fast-Forward Merge (No Option)

Non-Fast-Forward Merge (--no-ff Option)

Squash Merge

Rebase Branch – Git Rebase

Managing Conflict

Stash Changes – Git Stash

Chapter 6. Remote Collaboration

Git Regular Workflow – Remote Collaboration

Remote Collaboration Overview

Link With Remote Repository – Git Remote

Upload to Remote Repository – Git Push

Download Remote Repository and Merge to Local Repository – Git Pull

Get Remote Repository Information to Local Repository – Git Fetch

Pull vs. Fetch

Request for Review and Merge – Pull Request

Merge Operation Using GitHub

Chapter 7. Supplemental Topics

Git Key Commands and GitHub Key Features

Git & GitHub Glossary

GitHub Other Features