Using Git to install and update a site

To install a website from a Git repository in cPanel, follow these steps:

  1. Log in to cPanel.
  2. Open the Git Version Control tool.
  3. On the Git Version Control page, click "Create".
  4. Confirm that the "Clone a Repository" slider is enabled.
  5. In the "Clone URL" text box, enter the URL of the repository you want to clone.
  6. In the "Repository Path" text box, specify the path to the document root of the site.
  7. In the "Repository Name" text box, provide a descriptive name for your repository.
  8. Click "Create".

After completing these steps, the website will be installed in the document root directory, and you will see the index.html file and a .git directory containing Git files.

To update the website from the Git repository, follow these steps:

  1. Log in to cPanel.
  2. Open the Git Version Control tool.                                                                                                                           Git version control tool
  3. Locate the repository you want to update and click "Manage":    Repository
  4. Click the "Pull or Deploy" tab, :                                                                                                                                                 Pull or Deploy
  5. Click "Update from Remote", :                                                                                                                                                 update from remote

The updated files will be pulled from the remote repository and will replace the existing files in the document root directory.

If you need to clone a private repository, you will need to use an SSH key pair and the SSH protocol in the clone URL. Here's how:

  1. Create an SSH key pair on your Turnuphosting account.
  2. View the text of the public key.
  3. Add the SSH public key to your Git provider.
  4. Test the SSH connection to the Git provider.
  5. In cPanel, open the Git Version Control tool and click "Create".
  6. Enter the clone URL using the ssh:// protocol.
  7. Specify the repository path, repository name, and click "Create", example : Repository name

cPanel will clone the private repository using the SSH protocol and the specified settings. To update the repository, follow the steps mentioned earlier.

By following these instructions, you can easily install and update a website from a Git repository in cPanel.

Was this answer helpful?

Related Articles

550 Sender verify failed error message

The "550 Sender verify failed" error message typically occurs when the sender's email...

Accessing cPanel

There are three ways you can access your cPanel account and either way will work. You can search...

Accessing phpMyAdmin and phpPgAdmin

To access phpMyAdmin and phpPgAdmin in cPanel, follow these steps: Log in to your cPanel...

Accessing the Managed Team feature in cPanel

To access the Manage Team feature on TurnupHosting, follow these steps: Log in to cPanel by...

Accessing webmail clients directly

To provide users with direct access to a specific webmail client when they log in, you can...