Step 1: Set Up Your Server
- Choose Your Hardware: Select a server that meets your requirements (e.g., CPU, RAM, storage). A used Lenovo ThinkServer PC or a Raspberry Pi can be good options.
- Install an Operating System: Install a Linux distribution like Ubuntu Server. Follow the installation instructions specific to your chosen OS.
Step 2: Install Git
- Update Your System: Run
sudo apt update
andsudo apt upgrade
to ensure your system is up-to-date. - Install Git: Install Git using the command
sudo apt install git
.
Step 3: Create a Dedicated Git User
- Create a New User: Run
sudo adduser git
to create a new user for Git operations. - Set Up SSH Keys: Generate an SSH key pair for the
git
user usingsudo -i -u git ssh-keygen
.
- Follow the prompts to create the key