Skip to content
CODE THE PIXEL
Misc

Clone GitHub Private Repository from cPanel Using SSH

Asyraf Wahi Anuar Updated 2 min read

Clone a private GitHub repository using SSH and cPanel. The Git Version Control feature allows developers to easily host Git repositories on the developer cPanel account.

This tutorial may be outdated

It was last reviewed 4 years ago. Some steps may differ in newer versions.

The Git Version Control feature allows developers to easily host Git repositories on the developer cPanel account. The developer can use Git to maintain any set of files (for example, a website’s files and assets, a software development project, or simple text files). The Git version control is very useful for developers and it makes the process of repository cloning become easier and beginner-friendly. Visit cPanel Git Version Control for more information.

Requirement

SSH access
Putty

Install & Execute Putty

Download the latest Putty from their official website. Access your webserver through SSH using putty.

HTML
hostname: CpanelLoginName@webserverIPAddress eg: admin@101.101.101.101
port: 22 or you can contact your hosting provider

Generate SSH Key

generate the SSH key using the following command:

Terminal
ssh-keygen -t rsa -b 4096 -C "username@servername"

Just press enter if SSH asked for the passphrase and it will generate the key. Next, navigate to your cPanel-SSH Access-Manage SSH Keys and authorize the generated key.
Next, view and copy the SSH key value. The copied key will be used later.

Deploy SSH Key into Github Private Repo

Navigate to your GitHub private repository - Settings - Deploy keys - Add deploy key. Give the key title, and paste the copied SSH key. Don't forget to check the 'allow write access.

Next, in the Github private repo, go to the code tab, the click button and copy the clone SSH link. The clone SSH link will be used later.

Clone The Private Repo via Cpanel

Navigate to Cpanel - Git Version Control - Create. Configure the required information. In the clone URL, paste the SSH link (copied from the GitHub repo). Cpanel will clone the private repo to the configured path.

That's all. Happy coding :)

Did this tutorial help?

236 readers found this helpful

Comments

No comments yet. Questions about this tutorial are welcome here: the answer helps the next reader too.

Leave a comment

Markdown works: `code`, ``` blocks, **bold**, links.

First comments are reviewed before they appear.

CakePHP

Using Bahasa Melayu Table Names in CakePHP

Learn how to use Bahasa Melayu table names like "pengguna" in CakePHP while following the framework’s naming conventions. Includes tips for using the Bake tool and avoiding pluralization issues.

5 min read

Misc

Git Tutorial: Uploading a Project to GitHub and Collaborating with Others

Version control is essential for developers, and Git is a powerful tool that helps manage project changes efficiently. GitHub, a popular platform built on Git, not only hosts repositories but also facilitates collaboration among developers worldwide. In this tutorial, we will explore the process of...

4 min read