How to Connect GitHub to cPanel Using Git Version Control
Connecting your GitHub repository to cPanel's Git Version Control lets you pull code directly from GitHub to your dotCanada server - a clean, organized way to manage deployments.
Step 1: Generate a Deploy Key
- Connect to your server via SSH.
- Run:
ssh-keygen -t rsa -b 4096 -C 'deploy@yourdomain.com' - Save the key in a memorable location (e.g.,
~/.ssh/github_deploy). - Copy the contents of the public key:
cat ~/.ssh/github_deploy.pub
Step 2: Add the Deploy Key to GitHub
- Go to your GitHub repository and click Settings.
- Navigate to Deploy keys and click Add deploy key.
- Paste your public key, give it a title, and click Add key.
Step 3: Clone the Repo in cPanel
- In cPanel, go to Git Version Control.
- Click Create and check Clone a Repository.
- Enter your GitHub repository's SSH URL (e.g.,
git@github.com:username/repo.git). - Set the repository path on your server and click Create.
Pulling Updates
After the initial clone, visit the Git Version Control panel, click Manage on your repo, and use Pull or Deploy to fetch the latest changes from GitHub.
If you run into authentication issues or need help with the setup, contact our support team for guidance.
100% Satisfaction Guarantee
We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.
Ready to Get Started?
Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.
Get Started Today
