MODULE 2.1
Git, gh, and an SSH key on GitHub
Connect your computer to your GitHub account with an SSH key, create a repository (public or private), and publish the page.
What it is
Use the same email as your GitHub account. You only need to do this once per computer.
Why learn it
Every saved version includes your name. GitHub uses your email to link versions to your account.
Key concepts
git config: configures Git. --global: applies to all projects on this computer. Commit: a saved version of the project, with an author and message.
What it is
Press Enter at all 3 prompts to accept the default location and continue without an extra password. Then explorer opens the folder where the keys were saved.
Why learn it
An SSH key is your passwordless identity: GitHub and the VPS recognize your computer through it.
Key concepts
SSH: a secure way to connect two computers. Private key: stays on your machine and is never sent. Public key (.pub): the one you give to GitHub and the VPS.
What it is
Answer: GitHub.com → SSH → choose id_ed25519.pub → Login with a web browser. Copy the code, paste it into your browser, and authorize. Then test the key; the first time, answer yes.
Why learn it
One command logs you in and sends your public key to your account, without opening settings on the website.
Key concepts
gh auth login: signs in to your GitHub account from the terminal. SSH protocol: Git starts using your key instead of a password. ssh -T: tests the connection without opening anything.
What it is
git init enables Git in the folder, add and commit save the first version, and gh creates the repository and uploads everything. For a private repository, replace --public with --private.
Why learn it
Public: anyone can see it (required for free Pages). Private: only you and people you invite can see it. You decide for each project.
Key concepts
Repository: the project folder and its full history, stored on GitHub. Branch main: the main line of versions. Push: upload versions to GitHub.
What it is
This command enables GitHub Pages for the repository in the current folder. You can also do it on the website: Settings → Pages → branch main → Save.
Why learn it
You get a public link to the page the agent created, without paying for hosting.
Key concepts
GitHub Pages: free hosting for pages from a repository. {owner} and {repo}: gh automatically replaces these with your username and repository name.
What it is
Did something change? See what changed, save a version with a short sentence, and upload it. Or ask the agent: save and upload to GitHub.
Why learn it
Each commit is a restore point. If something breaks, you can recover the previous version.
Key concepts
git status: shows what changed since the last version. Commit message: a sentence that says what changed, so you can find it later.