The customer portal my.neoserv.com has been redesigned. If you notice any issues, please let us know.

Cart (0)
  • Your cart is currently empty.

NEOSERV BLOG

Tips, guides and useful information about domains, hosting, SSL certificates, email, web optimization and online security.

Povezava: zasebni GitHub repozitorij - cPanel
Category: Tips and Tricks
Published:

The cPanel dashboard functionality – Git™ Version Control – allows developers to easily host Git repositories in their cPanel account. Git can be used to maintain any set of files, e.g. website files, a software development project or just simple text files.

Git™ Version Control is an extremely useful tool for developers as it makes the process of cloning a repository much simpler and beginner-friendly. See below how to connect a private GitHub repository to cPanel.

Table of contents

  1. Creating an SSH key in cPanel
  2. Adding the public part of the key to GitHub
  3. Linking cPanel to a private GitHub repository

1. Creating an SSH key in cPanel

First, you need to create an SSH key named id_dsa in the cPanel control panel. To learn how to create an SSH key in just a few steps, read How to manage SSH keys in cPanel.

cPanel – Creating Public SSH Key id_dsa

The SSH key you will use to connect between your private GitHub repository and your cPanel account must not include a password. This is because GitHub does not support password-protected SSH keys.

2. Adding the public part of the key to GitHub

The next step is to add the public part of the SSH key you created in step 1 to your GitHub account.

1. After signing in to GitHub, click on your profile icon in the top right corner and navigate to your account settings by clicking on Settings.

GitHub - Settings

2. Click on SSH and GPG keys in the left menu, then click on the green New SSH key button to add your public key.

GitHub – SSH and GPG Keys – Adding an SSH Key

By adding the public part of the SSH key to GitHub, you have given your cPanel account access to the private GitHub repository.

3. Connecting cPanel to the private GitHub repository

The only final step left is to connect your cPanel account to the private GitHub repository.

1. Log into the cPanel Control Panel and click on the Git™ Version Control icon in the FILES icon section.

cPanel - Git™ Version Control

2. On the right-hand side, click the blue Create button, then edit the following settings:

  • Clone a Repository – the Clone a Repository feature should be enabled;
  • Clone URL – enter a URL of the form: git@github.com:<user_name>/<repository_name>.git;
  • Repository Path – enter the path where you want to clone the contents of your GitHub repository;
  • Repository Name – enter the name of the “local” repository (does not affect functionality).

cPanel - Git™ Version Control - settings

3. Once you have entered all the above information, all you have to do is click the blue Create button to clone the contents of your private GitHub repository to cPanel.

Remote command-line access to the server ( Shell Access) is not required to connect cPanel itself to your private GitHub repository. You would need it if you wanted to perform command line operations such as Pull, Push, Commit, etc. You can read more about handling SSH in this article.

COMMENTS

COMMENT THE POST

(mandatory)
(mandatory, email address will be hidden)
(optional)
Security question that confirms you are a real person.