Hostxpeed
Login Get Started →
Getting Started

How to Clone GitHub Repo on VPS

3 min read
22 views
Jun 10, 2026

Prerequisites

Before cloning a repo, make sure you have:

  • SSH access to your VPS
  • Git installed
  • Repository URL

Install Git

Connect to your VPS:

ssh hxroot@YOUR_SERVER_IP -p 22
apt install git -y

Clone HTTPS Repository

git clone https://github.com/username/repository.git

Clone Specific Branch

git clone -b branch-name https://github.com/username/repository.git

Clone into Specific Directory

git clone https://github.com/username/repository.git my-folder

Clone SSH Repository (Requires SSH Key Setup)

git clone git@github.com:username/repository.git

Update Existing Repository

cd repository
git pull

✅ Repository has been cloned to your VPS.

Was this article helpful?