ALICE · LEARN CHARLIEHUB

Mail Club · Camp Post the one with the password error everyone hits

Reference · /learn/

ISSUE 05

The Trail Markers

Basecamp covered why this project needs two machines and what connects them. This page is that connection, built for real — installing git, making the first commit, creating the GitHub repo, hitting the exact error almost everyone hits on their first push, fixing it properly, and then doing the whole thing a second time on a machine that can’t even open a browser.

Where this is going: Six stops: installing the tools, the first commit (and what ‘staged’ actually means), creating the GitHub side, the password error and the real fix, proving the connection actually works, and doing it all again on the server — where the same error shows up a second time, for a reason worth understanding rather than just re-fixing on autopilot.

Git + GitHub CLI Two machines, two setups One error, twice Verified four ways
Stickers
  • the MacBook Air
  • the server, CT 2554
  • Git & GitHub
  • authentication
  • the three states
  • a milestone — earned here

PART B — THE HOW

01Part B

Getting git onto the machine

Three things get installed or set once, ever. Knowing which is which saves repeating all of them.

Started on the MacBook, with Homebrew already installed:

MacBook Air — terminal
$ brew install git

One real stumble worth recording exactly because it’s such an easy one to repeat: an early attempt failed because a docs example got copy-pasted including the literal $ at the start of the line. That $ isn’t part of the command — it’s just how terminal instructions mark ‘this is a command you type,’ the same way a recipe might write ‘1. Preheat oven’ without expecting you to type the number. Once that $ was left out, the install ran cleanly.

Then, once — and only once, ever, on this machine:

git’s permanent identityset once per machine
$ git config --global user.name "Alice Paumelle"
$ git config --global user.email "apaumelle@icloud.com"

That’s git’s permanent identity for every project on this machine. Nothing about this step needs repeating, here or on any future project — it’s stored globally, not per-project.

The thing to hold on to

Three different things get confused under ‘git setup,’ and they behave completely differently: Homebrew and git itself are installed once per machine, ever. Identity config (name/email) is set once per machine, ever. GitHub authentication (coming up shortly) is also once per machine — but needs doing separately again on any second machine, because nothing here carries over automatically between them.

Section Review Card

no. 01 of 06
Concept:
Install once, configure identity once, authenticate per machine.
Gotcha:
The $ is the prompt, not part of the command.
One thing I actually understood today:
Badges:

02Part B

Starting the project

A folder becomes a project the moment you say so, and not a second before.

A folder isn’t a git project until you tell it to be one:

MacBook Air — terminal
$ mkdir ~/currency-portfolio-tool
$ cd ~/currency-portfolio-tool
$ git init

git init only works inside the folder you actually want tracked — run it from the wrong place and git says so plainly: fatal: not a git repository.

Then the first real file:

the first file
$ echo "# Currency-Adjusted Portfolio Performance Tool" > README.md

A commit needs something to actually commit — an empty folder gives git nothing to record. A README is the standard first file for exactly this reason, and it’s genuinely useful anyway: it’s the description anyone sees first when they land on the repo.

What ‘staged’ actually means

Before the actual commit commands, worth being precise about a word that gets thrown around loosely: ‘staged.’ Git tracks a file through three real states, and they map cleanly onto making a s’more:

ONE CHANGE, FOUR STATES 1 WORKING DIRECTORY (just editing) changes on disk,not told to git yet 2 STAGED git add . marked for thenext commit 3 COMMITTED git commit -m "…" part of the project’shistory now 4 PUSHED git push up on GitHub, wherethe server can reach it
Steps 1 to 3 all happen on this machine and nobody else can see them. Step 4 is the only one that leaves it — which is why its marker is a different colour.
  1. Working directory

    The ingredients sitting separately, unassembled. This is any file with changes that exist on disk but haven’t been told to git yet.

  2. Staged

    Assembled on the stick, held over the fire, about to go in. This is git add — marking specific changes as ‘yes, include this in the next commit.’

  3. Committed

    Toasted and sealed together, a real s’more now. This is git commit — the change is now permanently part of the project’s history.

  4. Pushed

    Shared around the fire with everyone else. This is git push — sending committed history up to GitHub, where the other machine can reach it.

The commands, in order:

staging and committing
$ git add .
$ git commit -m "Initial commit"
Reversible on purpose

git add doesn’t touch the file itself — it only marks which changes go into the next commit. You can stage something, change your mind, and unstage it, the same way you can pull the marshmallow back off the stick before it goes anywhere near the fire.

Section Review Card

no. 02 of 06
Concept:
Working directory → staged → committed → pushed.
Key line:
git add . then git commit -m "…"
One thing I actually understood today:
Badges:

03Part B

Creating the repo, and the first push

Everything works right up until the moment it asks for a password.

On github.com: New repository → currency-portfolio-tool → Private (reasoning for that choice lives back on the Basecamp page) → deliberately not initialized with a README, since that would conflict with the one already sitting locally.

Then connecting the local folder to that new GitHub repo:

connecting local to remote
$ git remote add origin https://github.com/AlicePaumelle/currency-portfolio-tool.git
$ git branch -M main
$ git push -u origin main

And immediately:

what came backthe error everyone hits
remote: Invalid username or token. Password authentication is not
remote: supported for Git operations.
fatal: Authentication failed

This isn’t a mistake — it’s expected. GitHub disabled plain password login for git operations years ago, for security. Typing a GitHub or Apple ID password at that prompt was never going to work, for anyone, ever again.

The one that catches people

This exact error is close to a rite of passage — genuinely one of the most-hit errors for anyone’s first-ever git push. Knowing it’s not personal, and not a sign of doing something wrong, is most of what makes it not-frustrating the second time.

Section Review Card

no. 03 of 06
Concept:
Password auth for git was removed years ago, for everyone.
Not a bug:
The error is the expected outcome, not a mistake.
One thing I actually understood today:
Badges:

04Part B

Authenticating the real way

A browser login, once, and the machine never asks again.

The fix is the GitHub CLI (gh) — it handles login through an actual browser, not a password prompt:

MacBook Air — terminal
$ brew install gh
$ gh auth login

Prompts, answered in order: Account → GitHub.com. Protocol → HTTPS. Authenticate Git with GitHub credentials → Yes. Method → Login with a web browser.

That gave a one-time code, opened a browser, the code went in, done. This also quietly configures git itself to use this login automatically from now on — no more manual auth on this machine, ever, for this account.

and againthis time it works
$ git push -u origin main

Succeeded — ‘new branch main -> main.’ Confirmed properly by loading the repo on github.com and actually seeing the README rendered there, not just trusting the terminal’s word for it.

Section Review Card

no. 04 of 06
Concept:
gh auth login authenticates through a browser, once.
Side effect:
It configures git to use that login automatically.
One thing I actually understood today:
Badges:

05Part B

Four checks, not one

Belief isn’t verification.

Four commands, each proving something slightly different, in order of what they actually establish:

CommandWhat it actually proves
gh auth statusIs this machine authenticated to GitHub at all?
git remote -vIs this folder linked to the right GitHub repo?
git fetchCan it actually reach GitHub right now?
git ls-remoteDoes GitHub confirm it has the exact same commit?

The strongest of the four is the last one — git ls-remote returning the same commit hash (7961d18…) as the local git log means GitHub itself is confirming what it’s actually storing, not just that a connection technically exists.

What never repeats, and what always does

Steps 1 and 2 here (Homebrew/git install, identity config) never need repeating on this machine. The only thing that resets every new terminal session is location — every session starts back at the home folder, and cd back into the project is needed fresh each time.

Section Review Card

no. 05 of 06
Concept:
Four commands, four different claims. Prove, don’t assume.
Strongest:
git ls-remote — GitHub confirms the hash itself.
One thing I actually understood today:
Badges:

06Part B

The server doesn’t get any of this for free

Same wall, same fix, second machine. Nothing crosses over on its own.

Claude Code doesn’t live on the Mac — it lives on the server. Getting there:

from the MacBook
$ ssh alice

Landing in alice@alice-playground:~/projects. First attempt to bring the project here hit the exact same password-auth wall as before — because gh had never been authenticated on this machine. Nothing from the Mac’s setup carries over automatically. Each machine needs its own independent gh login, every time, with no exceptions.

Same fix, same shape:

on the serverthe second login
$ gh --version                 # already installed here
$ gh auth login                 # GitHub.com → HTTPS → Yes → web browser

One real difference on a headless server: it can’t open a browser itself. Instead of launching one, it printed a URL and a one-time code and waited — the code went in via a browser on the Mac instead, and the terminal picked up completion on its own.

Flagged, not fixed

One thing worth flagging rather than fixing: gh warned that authentication credentials were being saved in plain text on the server. Expected for a headless machine without a full desktop credential manager — not urgent on a private personal server, but a genuinely weaker storage method than the Mac’s encrypted keyring. Noted, not solved today.

Final commands:

bringing the project down
$ cd ~/projects
$ git clone https://github.com/AlicePaumelle/currency-portfolio-tool.git
$ cd currency-portfolio-tool

Clean clone, same commit that was pushed from the Mac, confirmed pulled down correctly.

From the trail log

Dear Camper,

One minor slip along the way, worth keeping rather than editing out: a second git clone got run on the Mac while already standing inside ~/currency-portfolio-tool, which created a nested duplicate folder inside itself. Harmless, just clutter — the lesson is that clone only belongs in a fresh, empty location, never inside a folder that’s already the repo.

— noted at the trailhead

Section Review Card

no. 06 of 06
Concept:
Authentication is per machine. Nothing carries over.
Headless:
No browser — it prints a code and waits instead.
Open:
Credentials stored in plain text on the server.
One thing I actually understood today:
Badges:
PART B 21 AUG 2026 PART B 21 AUG 2026

Dispatch postedPart B, cut and dated.

End of the second dispatch

Both machines can now reach the same project, independently, through GitHub. Nothing has actually been built yet — that starts next, along with a mistake that got caught one command before it happened.