Tag Archives: Git Repository

Creating Git-Based Collaboration Repository On cPanel Hosting Or Server

Git is a distributed version control system (VCS) used for tracking changes in the source code during the software development process. It was created by Linus Torvalds in 2005 and has now become one of the most widely used version control system in software development field.

The advantage of Git is that it allows multiple developers to collaborate on a project by keeping track of changes, coordinating work, and providing a historical record of all modifications made to the codebase.

The Sangkrit.net’s cPanel WebhostingWebhosting PlusVPS, and Dedicated Server all offer you a feature called “Git™ Version Control”. This function simply enables you to set up and manage Git repositories for your website’s code. By Git integration in cPanel, website owners and developers can take advantage of version control functionalities directly from the cPanel interface, without the need to access the command line. So this lesson guides you on how you can easily create the Git Repository on your Sangkrit.net hosting option.

Login to your SANGKRIT.net Account, then visit ‘My Products’ page and open the cPanel of the account on which you want to create the Git repository.

  1. On your cPanel account, scroll down to Git Version Control present in the Files section.
  2. Click Create in the top-right corner of the interface and a new interface will appear.
  3. Select whether to clone an existing repository, create a new one, or add an existing one to the list of cPanel-managed repositories.
  4. To clone an existing repository, ensure that the Clone a Repository toggle is enabled. Then, enter the clone URL for the repository that you wish to clone in the Clone URL text box.
  5. To create a new repository or add an existing repository to the list of cPanel-managed repositories, set the Clone a Repository toggle to be disabled.
  6. In the Repository Path text box, enter the path to the directory that will contain the repository.
  7. In the Repository Name text box, enter the desired display name for the repository.
  8. To immediately create another repository, select the Create Another checkbox.
  9. Click Create, or click Return to Repository List to return to the list of repositories.

In the step number five, URL must include the http://https://ssh://, or git:// protocols or use the user@example.com/path format, where user represents the username, example.com represents the domain, and path represents the repository path. Another thing is, you cannot enter a local repository path.

In the step number six, a few important things for you to note down are:

  • If the directory specified doesn’t exist, the system will create it.
  • If the directory already has a repository, the system will add it to the list of cPanel-managed repositories.
  • The function enforces several restrictions on repository paths.
  • Unless you’re adding an existing repository to the list, the directory must be empty.
  • Subdomain directories have a cgi-bin directory and may also contain a .well-known directory. So you must move these before you can create a repository.

Another important thing to know is that if you have entered an SSH clone URL while clicking the Create option, the system will check for the remote server’s public SSH host key. It keeps this key in the /home/user/.ssh/known_hosts file, where user represents your username.

When the remote host is not registered with the system, you will have to click the Save and Continue option to register it to the file. You may optionally click Show Host Identification Information to view the host’s algorithm and SHA-256 and MD5 fingerprints. When the remote host is registered, the system creates the repository and at the time the remote host’s public key is changed, the system displays a warning.

Git has gained its popularity because of its flexibility, speed, and user support for the distributed workflows. It is a very useful tool for software development teams from small to big sizes. It has been commonly used with collaborative software and web development projects. It is also the foundation for many online code hosting systems, such as GitHub, GitLab, and Bitbucket, which provide cloud-based hosting for Git repositories for better collaboration among developers.