GitHub Guide for Beginners: Answering Frequently Asked Questions
Key point
For GitHub beginners, this explains how to set up SSH keys and the concept and usage of Personal Access Tokens (PATs).
Details
Let's look at SSH and Personal Access Token (PAT), two of the most frequently asked questions among GitHub beginners.
An SSH key is a secure shell key, consisting of a pair: a private key stored on your computer and a public key shared with GitHub. When a user pushes or pulls code, Git verifies the user's identity by matching the public key registered on GitHub with the private key on the computer.
The steps to set up an SSH key are as follows:
- Generate a key pair using the
ssh-keygencommand - Register the generated key with
ssh-agentto avoid the hassle of entering a password each time - Register the public key in GitHub's Settings > SSH and GPG keys menu
A PAT (Personal Access Token) is a special credential used for authentication by tools that use the CLI or the GitHub API. Users can directly control the permissions of a PAT and revoke it at any time if needed.
There are two types of PATs:
- Fine-grained tokens: a method that allows more granular control over permissions
- Classic tokens: the existing type of token
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.