Gitlab Local Setup
GitLab Local Setup Guide (Windows • macOS • Ubuntu)
This document explains how to set up Git + SSH and connect to our self-hosted GitLab:
This guide is written for beginners and works the same for Windows, macOS, and Linux.
1. Prerequisites
-
GitLab account created
-
Access to the project repository
-
Internet connection
-
Terminal access:
- Windows → Git Bash
- macOS / Linux → Terminal
2. Install Git
Windows
Download and install Git: https://git-scm.com/download/win
Use default options.
Verify:
git --version
macOS
brew install git
Or:
xcode-select --install
Ubuntu / Debian
sudo apt update
sudo apt install -y git
3. Configure Git (One-Time)
git config --global user.name "Your Name"
git config --global user.email "mail@email.com"
git config --global init.defaultBranch main
4. Generate SSH Key
cd ~/.ssh
ssh-keygen -t ed25519 -C "mail@email.com"
ssh-add ~/.ssh/id_rdd
sudo nano ~/.ssh/config
Host git.darmist.com
HostName git.darmist.com
AddKeysToAgent yes
IdentityFile ~/.ssh/id_rdd
5. Add SSH Key to GitLab
cat ~/.ssh/id_rdd.pub
Add the key in: Profile → Preferences → SSH Keys
6. Test SSH
ssh -T git@git.darmist.com
7. Clone Repository
git clone git@git.darmist.com:GROUP/PROJECT_NAME.git
Example:
git clone git@git.darmist.com:shakat/bmi-calculator.git
8. Push Existing Project
git init
git add .
git commit -m "Initial commit"
git remote add origin git@git.darmist.com:GROUP/PROJECT_NAME.git
git branch -M main
git push -u origin main
9. Daily Workflow
git add .
git commit -m "message"
git pull
git push
10. Common Fixes
Remote exists
git remote set-url origin git@git.darmist.com:GROUP/PROJECT_NAME.git
Windows ownership issue
git config --global --add safe.directory FULL_PATH
Happy coding! 🚀