Plans & Pricing Support Login

Knowledge Base

Find answers to commonly asked questions here.

Clone Git Repository

You can create a Git repository that will be a clone of a remote repository. Go to Websites&Domains and click Git. If you have already created Git repositories for your domain, click the Add Repository button. You will see the screen for creating a new repository:

First, you have to select where your code is stored. In this scenario, select Remote git hosting like GitHub or BitBucket.

Remote Git repository. Enter the path to your remote repository in BitBucket or GitHub. You can enter it in either HTTPS or SSH format. HTTP/HTTPS authentication is not supported, so you can use HTTP/HTTPS protocol only if a repository does not require authentication. If a private Git repository is used, you must authenticate with an SSH key generated by Plesk (refer to Use SSH Connection for details).

In the Your Website section, specify the following:

  • The deployment mode. By default, the Automatic deployment is used. This means that all changes pushed to the Git repository will be automatically deployed to the production site. If you want to change the deployment mode, click the automatically deployed link and select another option in the opened Deployment Mode window. If Manual deployment is selected, you will need to manually deploy files from the Git repository to your hosting. If No deployment is selected, the files will not be deployed to the production site (this can be used, for example, to store and exchange code).

  • A target directory for publishing Git files on your website. By default, the /httpdocs directory is used. You can change it to another existing directory by clicking the directory name.

Click OK. Plesk will try to connect to the remote repository and clone it.

After the progress dialog shows that the cloning has completed successfully, the new repository will be displayed on the Git page.

The new repository will be displayed at Websites & Domains > Git. The name of the remote repository will be used as a Git repository name. You can rename the repository later (refer to the Rename or Remove a Repository section).

The created repository is a clone of the remote repository and will be used for pulling changes from it and deploying them to the target directory.