How to use Git with Plesk
Here is how to configure Plesk's integration with the Git version control system.
- Setting up a remote repository
- Creating a local repository
Setting up a remote repository to pull files from
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.
If you do not know how to log in to your Plesk account, please see this article.
2- In the left sidebar, click Websites & Domains:
3- Locate the domain you want to configure, and then click the Git icon:
4- On the Add Git Repository page, confirm the Remote Git hosting (like GitHub or BitBucket) option is selected:
5- In the Remote Git repository text box, type the URL where the remote repository is hosted:
(Plesk supports HTTPS and SSH protocols for Git.)
- Select the deployment mode, click on the link where it says "automatically deployed" and change to select the mode you want, and then click Ok.
- To select the deployment directory on your site, click on the link where it says "/httpdocs/" and select the local directory you want to use, and then click Ok.
6- Click OK: Plesk will clone the remote repository into the local directory you specified previously.
7- To pull updates from the remote repository, click Pull Updates.
Creating a local repository
In Plesk, you can create a local Git repository. To do this, follow these steps:
1- Log in to Plesk.
If you do not know how to log in to your Plesk account, please see this article.
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 you are creating:
- To select the deployment mode, click click where it says "automatically deployed" and select the mode you want, and then click Ok.
- To select the deployment directory on your site, click where it says "/httpdocs/" and select the local directory you want to use, and then click Ok.
- Click OK: Plesk will create the local repository.