How to use Git with Plesk ?

This article explains how you can integrate Git version control with Plesk.

Setting up a remote repository

In Plesk, you can configure a remote Git repository and pull files to your site. To do this, follow these steps:

  1. Log in to Plesk.
  2. In the left sidebar, click Websites & Domains:
  3. Locate the domain you want to configure, and then click the Git icon:

  1. On the Add Git Repository page, confirm the Remote Git hosting like GitHub or BitBucket option is selected:
  2. In the Remote Git repository text box, type the URL where the remote repository is hosted:Plesk supports HTTPS and SSH protocols for Git.
  3. To select the deployment mode, click automatically deployed, select the mode you want, and then click Ok.
  4. To select the deployment directory on your site, click /httpdocs/, select the local directory you want to use, and then click Ok.
  5. Click OK. Plesk clones the remote repository into the local directory you specified in step 7.

Creating a local repository

In Plesk, you can create a local Git repository. To do this, follow these steps:

  1. Log in to Plesk.
  2. In the left sidebar, click Websites & Domains:
  3. Locate the domain you want to configure, and then click the Git icon:
  4. Click Add Repository.
  5. Select Local repository on your workstation:
  6. In the Git Repository in Plesk text box, type the name of the new repository:
  7. To select the deployment mode, click automatically deployed, select the mode you want, and then click Ok.
  8. To select the deployment directory on your site, click /httpdocs/, select the local directory you want to use, and then click Ok.
  9. Click OK. Plesk creates the local repository.

Editing repository settings

To edit the settings of an existing repository in Plesk, follow these steps:

  1. Log in to Plesk.
  2. In the left sidebar, click Websites & Domains:
  3. Locate the domain you want to configure, and then click the Git icon:
  4. Locate the Git repository you want to edit, and then click Repository Settings:

  5. On the settings page, make the changes you want, and then click OK. Plesk updates the settings.

Was this article helpful?

Related Articles