You can clone a remote Git repository into your hosting account using the Git Version Control tool in cPanel. This process allows you to pull code from a remote host, such as GitHub or GitLab, directly into your local directory.
Important: This feature is only available on accounts where the Git Version Control extension is enabled by your hosting plan.
Before you begin
You will need:
A cPanel account with Git Version Control access.
The URL of the remote Git repository (e.g.,
https://github.com/user/repo.git).The specific local path where you want the repository to reside (e.g.,
public_html/my-app).
Cloning the Repository
Log in to your cPanel account.
Locate the Software section and select Git Version Control.
Click the Create button or select the Clone option (depending on your specific cPanel version).
Enter the following details:
Repository Name: Enter a name for the local repository.
Repository URL: Enter the full URL of the remote repository.
Path: Enter the absolute path where the repository should be cloned.
Click Create or Clone.
Confirm the result
Once the process completes, you will see a success message indicating the repository was cloned.
The repository will appear in the list of managed Git repositories in the cPanel interface.
The files from the remote repository will be available in the directory you specified in the Path field.
Limitations
This process only clones the repository; it does not automatically configure deployment scripts or environment variables. If your application requires specific configurations (such as a .env file), you must add those manually after the clone is complete.
