Hi everyone! 👋
I recently set up my development environment and thought I’d share how I installed Git, Docker, and configured Git with GitHub SSH on my machine. If you’re getting started with development or just want a clean setup, this guide might help you too!
🔧 1. Installing Git
Git is essential for version control, so it was my first step.
🖥️ Commands I Used:
sudo apt update
sudo apt install git
`
✅ Verifying Git Installation:
bash
git --version
If installed correctly, this returns something like:
git version 2.xx.x
🐳 2. Installing Docker
Next up was Docker — a tool I’ll be using to containerize apps and run environments in isolated containers.
Steps I Followed:
- Removed old Docker versions (just in case):
bash
sudo apt remove docker docker-engine docker.io containerd runc
- Installed dependencies:
bash
sudo apt update
sudo apt install ca-certificates curl gnupg
- Added Docker’s GPG key:
bash
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
- Added the Docker repository:
bash
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Installed Docker Engine:
bash
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- Verified Docker Installation:
bash
docker --version
This gave me something like:
Docker version XX.XX.X, build XXXXX
-
(Optional) To use Docker without typing
sudo
every time:
bash
sudo usermod -aG docker $USER
newgrp docker
🔐 3. Configuring Git with GitHub via SSH
To avoid typing my GitHub credentials every time I push changes, I set up Git to authenticate using SSH.
🧑💻 Steps I Took:
- Generated a new SSH key:
bash
ssh-keygen -t ed25519 -C "myemail@example.com"
I accepted the default file location and passphrase.
- Added the SSH key to the agent:
bash
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
- Copied my SSH key:
bash
cat ~/.ssh/id_ed25519.pub
- Added the key to GitHub:
- Went to GitHub > Settings > SSH and GPG keys
- Clicked “New SSH Key”
- Pasted the key and saved
- Tested the SSH connection:
bash
ssh -T git@github.com
It responded with:
Hi your-username! You've successfully authenticated...
- Set up Git username and email globally:
bash
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
✅ Final Thoughts
Now my environment is ready for development with:
- 📁 Git for version control
- 🐳 Docker for containerization
- 🔐 GitHub SSH for secure, password-free pushing and pulling
This setup will help me manage projects more efficiently and collaborate more smoothly. If you're setting up yours too and get stuck—feel free to drop a question!
Top comments (0)