BuycPanel Blog

BuycPanel Blog

Latest news and updates

How do you Create a GIT Repository on a cPanel Account?

Posted by Allura on 18 03 2019.

Introduction
One can navigate to (cPanel >> Home >> Files >> Git™ Version Control) to work on this feature.

The Git™ Version Control feature helps one to easily host Git repositories on one’s cPanel account. One can make a use of Git to maintain any set of files (like, a website’s files and assets, a software development project, or simple text files). One can read our Guide to Git  documentation and Git’s documentation to gather more information on this.

Create a Repository
Steps:

 	Firstly, one has to click on Create in the top-right corner of the interface. A new interface will appear thereafter.
 	One needs to select either of the options: to clone an existing repository or create a new one, or add an existing one to the list of cPanel-managed repositories:


 	In order to clone an existing repository, one has to ensure that the Clone a Repository toggle is enabled. After this, one…

Introduction

One can navigate to (cPanel >> Home >> Files >> Git™ Version Control) to work on this feature.

The Git™ Version Control feature helps one to easily host Git repositories on one’s cPanel account. One can make a use of Git to maintain any set of files (like, a website’s files and assets, a software development project, or simple text files). One can read our Guide to Git  documentation and Git’s documentation to gather more information on this.

Create a Repository

Steps:

  1. Firstly, one has to click on Create in the top-right corner of the interface. A new interface will appear thereafter.
  2. One needs to select either of the options: to clone an existing repository or create a new one, or add an existing one to the list of cPanel-managed repositories:
  • In order to clone an existing repository, one has to ensure that the Clone a Repository toggle is enabled. After this, one has to enter the clone URL for the desired repository desired to clone in the Clone URL text box.
  • One needs to set the Clone a Repository toggle to disabled, in order to create a new repository or add an existing repository to the list of cPanel-managed repositories.
  1. One needs to enter the path to the directory containing the repository, available in the Repository Path text box.
  2. One has to enter the desired display name for the repository, in the Repository Name text box.
  3. One has to select the Create Another checkbox in order to create another repository immediately.
  4. Click on Create, or click on Return to Repository List in order to return to the list of repositories, if the Create Another checkbox is selected, a success message will appear after that. If not, then a new interface will display a confirmation message and a list of useful Git commands.

SSH Host Key Verification

After entering an SSH clone URL, the system will check for the remote server’s public SSH host key automatically, when one clicks on Create. The system will store this key in the /home/user/.ssh/known_hosts file, where user will represent the username.

If the remote host is not registered with the system, then click on Save and Continue to add it to the file (register it), and if already registered, the system will create the repository.

If the remote host’s public key has been changed, the system will display a warning.

Repository Path Restrictions

  • The .git directory

The system denies public access to repositories’ .git directories without an exception.

  • Character Restrictions

One cannot create, delete, or view repositories with paths including whitespace or any of these characters:

\ * | ” ‘ < > & @ ` $ { } [ ] ( ) ; ? : = % #

  • cPanel Controlled Directories

One cannot create, delete, or view repositories in these directories:

.cpanel

.trash

etc

Conclusion

All valuable information and related information on GIT repository has been outlined in this article.