Configuring Git repository on hosting

To add a Git repository on a hosting site, log in through cPanel server panel, and then go to Git Version control located in the Files section.

How do I configure the Git repository in cPanel?

1. Log in to Your cPanel account.

2. Navigate to  Files section and "Git Version Control" will be available there.

Configuring Git repository - step 1

3. Click on the "Create" button.

Configuring Git repository - step 2

4. After the page has been reloaded, the following fields will be be filled.

Configuring Git repository - step 3

  • Clone URL - in this field You have to enter address of your repository (SSH key access configuration),
  • Repository path - path to your repository on hosting account,
  • Repository name - in this field you can name your repository,
  • click "Create" after fields are filled.

5. On finish You will see page with repo list, that include added repository.

A repository with SSH access

If you want to clone repository, that is accessed with SSH key, You must upload that key beforehand to server:

  1. Log in via FTP using main account data (FTP clients tutorials: WinSCP, Total Commander, CyberDuck, FileZilla).
  2. Create an .ssh directory (if it's not existing) with permissions of 700 (chmod; Full permissions for the user creating this directory).
  3. Check out tutorial: Generating SSH keys, if You didn't do that before.
  4. Upload id_rsa file that contains a private key to access the repository to the .ssh directory. The permission for this file after uploading should be 600 (chmod; read and write for the user who creates it). Additionally, the id_rsa file should not have additional password protection.

git, repozytorium, repositories, repo, hosting, repository


Also Read