Installing Git on an Ubuntu VM: A Small Technical Task That Immediately Became a Diplomatic Crisis

There is a particular species of lie told by technology tutorials.

It usually begins with:

“Setting up Git is easy.”

No.
Boiling an egg is easy.

Git setup is a procedural interrogation conducted by Linux, SSH, and GitHub working together like three hostile government agencies refusing to acknowledge each other’s paperwork.

The mission sounded simple enough:

  • install Git
  • connect Ubuntu to GitHub
  • create a repository
  • push files

That was the theory.

Reality arrived carrying a baseball bat.


Installing Git

The first step was civilized.

Which should always make you suspicious.

Update Ubuntu:

sudo apt update

Install Git:

sudo apt install git -y

Verify installation:

git --version

Output:

git version 2.x.x

Wonderful.

Git installed.

The machine behaved.

The illusion of competence remained intact.

Temporarily.


Early negotiations between Ubuntu and Git proceeded peacefully before SSH entered the conversation and ruined everything.


Configuring Git

Git demanded identification.

Reasonable.

Even software no longer trusts people.

So:

git config --global user.name "Teo Espero"

and:

git config --global user.email "[email protected]"

Check configuration:

git config --list

Everything looked clean.

Dangerously clean.

The kind of clean that usually precedes structural collapse.


At this point the operator still believed the situation remained under control. Historians would later dispute this assessment.


SSH Keys: Because Apparently Passwords Were Too Humane

Then came SSH.

SSH is one of those things computer people discuss casually while ignoring the fact that it sounds completely insane to normal human beings.

Generate cryptographic keys.

Add them to an authentication agent.

Copy public identities into remote servers.

Trust invisible machine relationships.

What could possibly go wrong?

Generate key:

ssh-keygen -t ed25519 -C "[email protected]"

Start SSH agent:

eval "$(ssh-agent -s)"

Add the key:

ssh-add ~/.ssh/id_ed25519

Display public key:

cat ~/.ssh/id_ed25519.pub

Copy the entire thing into GitHub SSH settings.

At this point, Ubuntu and GitHub were theoretically supposed to recognize each other.

Like civilized nations.

Instead they behaved more like two bureaucracies disputing passport authenticity.


Cryptographic credentials were exchanged under optimistic diplomatic conditions later revealed to be entirely fictional.


Creating the Repository

The GitHub repository was created:

ubuntu-dev01

Repository URL:

[email protected]:teoespero/ubuntu-dev01.git

Now here comes the embarrassing part.

At one point, I entered the repository URL directly into Bash like this:

[email protected]:teoespero/ubuntu-dev01.git

Ubuntu responded immediately:

bash: [email protected]:teoespero/ubuntu-dev01.git: No such file or directory

Which was Linux politely translating:

“What in the name of God are you doing?”

Because Bash thought I was attempting to execute a file literally named:

[email protected]:teoespero/ubuntu-dev01.git

Linux is extremely literal.

Painfully literal.

It does not infer intention.

It does not protect you from stupidity.

It simply documents your failure with machine efficiency.

The repository URL is not a command.

It is an address.

Meaning the correct command was:

git remote add origin [email protected]:teoespero/ubuntu-dev01.git

Tiny mistake.

Massive reduction in self-esteem.


An avoidable administrative incident occurred after a repository address was briefly mistaken for executable software.


Initializing the Local Repository

Inside the project directory:

git init

Connect to GitHub:

git remote add origin [email protected]:teoespero/ubuntu-dev01.git

Verify remote:

git remote -v

Expected:

origin  [email protected]:teoespero/ubuntu-dev01.git (fetch)
origin [email protected]:teoespero/ubuntu-dev01.git (push)

Everything looked operational.

Naturally, this is where the next disaster appeared.


Error #2 — “Repository Not Found”

Push attempt:

git push -u origin main

Result:

ERROR: Repository not found.
fatal: Could not read from remote repository.

Now this was insulting.

Because the repository absolutely existed.

I had just created it.

I was staring directly at it while GitHub calmly informed me that reality itself was apparently incorrect.

The problem turned out to be SSH authentication.

Meaning GitHub was looking at my SSH key and essentially saying:

“I don’t know this man.”

Which is extraordinary considering I had literally handed it the credentials myself.


The Fix

Test SSH authentication:

ssh -T [email protected]

Expected:

Hi teoespero! You've successfully authenticated...

The fix required:

  • verifying the SSH key was actually added correctly
  • ensuring the SSH agent was running
  • confirming GitHub was using the correct account
  • rechecking the repository remote

Then finally:

git push -u origin main

worked.

No applause.

No congratulations.

Linux merely stopped attacking me.

Which, in fairness, is the closest thing Linux has to affection.


What I Learned Today

I learned that Git is not actually difficult.

The difficult part is that tiny mistakes generate error messages that sound like international infrastructure collapse.

One missing keyword.

One incorrect SSH association.

One badly entered command.

And suddenly you are three terminal windows deep into a psychological hostage negotiation with Linux.

I also learned that Linux is brutally honest.

It does not flatter.

It does not reassure.

It does not gently guide.

If you type nonsense, Linux gives you nonsense-shaped consequences immediately and without ceremony.

And honestly, that may be why learning it properly feels satisfying.

Because when it finally works, you know it was not magic.

You actually understand:

  • what the commands do
  • how GitHub authentication works
  • why repositories connect
  • how SSH establishes trust
  • and exactly how easy it is to embarrass yourself in Bash

Which is not inspirational.

But it is real.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *