আমার হোস্ট হেল্প ডেস্ক আমার হোস্ট হেল্প ডেস্ক
  • হেল্প ডেস্ক আর্টিকেল
  • ফোরাম
My Account
আমার হোস্ট হেল্প ডেস্ক আমার হোস্ট হেল্প ডেস্ক
My Account
  • হেল্প ডেস্ক আর্টিকেল
  • ফোরাম
  • banner shape
  • banner shape
  • plus icon
  • plus icon

How to Connect GitHub Repositories to cPanel: Public & Private Guide

Updated on February 14, 2026
3 minutes
cPanel,Hosting
Share

How to Connect GitHub Repositories to cPanel: Public & Private Guide

Or copy link

Clipboard Icon
40 Views

Managing your web projects becomes significantly easier when you integrate Git Version Control directly into your cPanel. Whether you are working with an open-source public repo or a secure private project, this guide will walk you through the setup process step-by-step.

1. Connecting a Public Repository

Connecting a public repository is straightforward because it doesn’t require complex authentication.

  • Step 1: Go to your GitHub repository and copy the HTTPS link.

How to Connect GitHub Repositories to cPanel

  • Step 2: Log in to your cPanel and search for the Git™ Version Control tool.

  • Step 3: Click on Create.

  • Step 4: In the “Clone URL” box, paste the HTTPS link you copied. The remaining fields (File Path and Name) will auto-populate.

  • Step 5: Click Create, and your repository is now linked!

How to Connect GitHub Repositories to cPanel

2. Connecting a Private Repository (SSH Method)

Since private repositories require permission, we use SSH Keys to establish a secure connection between cPanel and GitHub.

Phase A: Generate SSH Keys in cPanel

  1. Open the Terminal in your cPanel.

  2. Run the following command to generate a new key:

    Bash

    ssh-keygen -t rsa -b 4096
    
  3. Press Enter to save it in the default location. When asked for a passphrase, leave it blank and press Enter again.

  4. To view your public key, run (replace username with your cPanel username):

    Bash

    cat /home/username/.ssh/id_rsa.pub
    
  5. Copy the entire output (the key starting with ssh-rsa).

How to Connect GitHub Repositories to cPanel

Phase B: Add the Key to GitHub

  1. Log in to your GitHub account.

  2. Go to Settings > SSH and GPG keys.

  3. Click New SSH Key, give it a title (e.g., “My cPanel Server”), and paste your key into the box. Save it.

Phase C: Configure the SSH Connection

Go back to your cPanel Terminal and run these commands to ensure cPanel knows how to use the key for GitHub:

Bash

touch ~/.ssh/config
chmod 600 ~/.ssh/config
nano ~/.ssh/config

Inside the editor, paste the following configuration:

Plaintext

Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa
    IdentitiesOnly yes

Press Ctrl+O, Enter, then Ctrl+X to save and exit.

Phase D: Final Permissions & Testing

Set the correct permissions for security:

Bash

chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub

Test the connection by running:

Bash

ssh -T [email protected]

If successful, you will see a “Hi [Username]! You’ve successfully authenticated” message.

3. Final Step: Clone the Private Repo

Now that the “handshake” is established:

  1. Go to GitHub and copy the SSH Link (not HTTPS) of your private repo.

  2. In cPanel Git™ Version Control, click Create.

How to Connect GitHub Repositories to cPanel

  1. Paste the SSH Link in the Clone URL box.

  2. Click Create.

Congratulations! Your private Git repository is now synced with your cPanel hosting.

Tags : cPanel github

Related Post

how-to-fix-error-fetching-installed-ssl-certs-in-cpanel
3 minutes cPanel

How to Fix Error Fetching Installed SSL Certs

If you are trying to install or manage an SSL certifica...

How to Fix “Unknown collation: ‘utf8mb4_0900_ai_ci’” in cPanel
1 minute cPanel

How to Fix Unknown collation: utf8mb4_0900_ai

If you use MySQL or MariaDB, you might have encountered...

6 minutes Getting Started

Why Amar Hoster Best in Bangladesh?

Why Amar Hoster Best in Bangladesh? If you are a busin...

Leave a Comment Cancel reply

Recent Posts

How to Connect GitHub Repositories to cPanel: Public & Private Guide
3 minutes February 14, 2026
SMTP Integration Guide with AmarHost
4 minutes January 19, 2026
How to Access Amarhost Shared Hosting via SSH using PuTTY
3 minutes January 19, 2026
VIP Member at AmarHost
Become a VIP Member at AmarHost and Unlock Exclusive Deals & Discounts
3 minutes January 9, 2026

Recent Comments

    Categories

    • AlmaLinux
    • Cloudflare
    • cPanel
    • Domain
    • Domain Guide
    • Getting Started
    • Hosting
    • Hosting Guide
    • Hosting Offer
    • Laravel
    • Script
    • Server
    • Server Guide
    • SMTP
    • Website & Apps
    • Webuzo
    • WHM
    • WordPress

    Tags

    .COM Domain Affordable Domains Affordable Pricing AlmaLinux Amar Hoster Buy .COM CDN Cheap Domains Cloudflare Cloudflare tutorial cPanel cPanel Email database DNS setup Domain Names Domain Registration Domain Transfer Email Configuration Email Deliverability Hosting Provider https://www.amar.host/affordable-com-domain-registration-starting-at-1099-tk-with-amar-hoster/ Installation guide Local Hosting PHPMailer Port 465 Port 587 Register Domain security Server setup setup guide SMTP Settings SPF and DKIM SSD Hosting SSL TLD Registration Transactional Email VPS hosting Web Hosting Web Hosting Guide website performance website security website speed whm WordPress SMTP WP Mail SMTP
    March 2026
    SMTWTFS
    1234567
    891011121314
    15161718192021
    22232425262728
    293031 
    « Feb    
    Leaf Illustration

    © 2025 All Rights Reserved by Amar Host