git: Git Repositories
The git
utility is used to manage Git repositories of a domain
through CLI.
Note: This utility is available when the Git extension is installed in
Plesk and is used with the plesk ext
utility.
By using this utility, you can perform the following tasks:
- view the list of all Git repositories on a domain or on all domains
- create or remove a Git repository
- update a Git repository settings
- get information on a Git repository
- deploy changes from a Git repository to a target directory
- fetch a remote Git repostory for a Git repository of the Using remote Git hosting type
- get public key of a domain
- get information on the last commit to a Git repository
For details about using Git repositories, refer to the Administrator’s guide.
Usage
plesk ext git <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]
Example
The following command creates Git repository example1 of the Using local repository type for the domain example.com:
plesk ext git --create -domain example.com -name example1
Commands
Command | Description | Example |
---|---|---|
--list |
Displays the list of Git repositories on all domains (by default). To display repositories on a specific domain, use with the
|
To display the list of Git repositories of the domain example.com plesk ext git --list -domain example.com |
--create |
Creates a repository. Used with the Optionally, can be used with the following options:
|
To create the push repository of the Using local repository type on the domain domain.com: plesk ext git --create -domain domain.com -name push To create the pull repository of the Using remote Git hosting type associated with the remote repository http://code.pp.plesk.ru/plesk/demo.git on the domain domain.com: plesk ext git --create -domain domain.com -name pull -remote-url http://code.pp.plesk.ru/plesk/demo.git |
--info |
Displays repository settings. Used with the |
To get information about the push repository on the domain domain.com: plesk ext git --info -domain domain.com -name push |
--update |
Updates repository settings. Used with the |
To update the name and to switch on the manual deployment mode for the repository demo1 on the domain domain.com: plesk ext git --update -domain domain.com -name demo1 -new-name demo2 -deployment-mode manual |
--remove |
Removes a repository. Used with the |
To remove the repository demo from the domain domain.com: plesk ext git --remove -domain domain.com -name demo |
--deploy |
Deploys changes from a repository to a target directory. Used with the |
To deploy changes from the repository demo on the domain domain.com: plesk ext git --deploy -domain domain.com -name demo |
--fetch |
Fetches a remote repository. This is applicable only for repositories of the Using remote Git hosting type. Used with the |
To fetch a remote repository for the repository demo on the domain domain.com: .. code-block:: guess
|
--get-last-commit |
Displays the information about the last commit. Used with the |
To get the information about the last commit for the repository demo on the domain domain.com: plesk ext git --get-last-commit -domain domain.com -name demo |
--help |
Displays help on the use of the utility. |
To view the help information on the use of this utility: plesk ext git --help or plesk ext git -h |
Options
Option | Parameter | Description | Example |
---|---|---|---|
-domain |
<domain> |
Domain name. Used with the following commands: |
To get information about the push repository on the domain domain.com: plesk ext git --info -domain domain.com -name push |
-name |
<repository name> |
Repository name. Used with the following commands: |
To create the push repository on the domain domain.com: plesk ext git --create -domain domain.com -name push |
-new-name |
<new repository name> |
New repository name. Used with the |
To update name for the repository demo1 on the domain domain.com: plesk ext git --update -domain domain.com -name demo1 -new-name demo2 |
-deployment-path |
<deployment path> |
Deployment path. Used with the |
To update the deployment path for the repository example1 on the domain example.com: plesk ext git --update -domain example.com -name example1 -deployment-path /httpdocs/test/ |
-remote-url |
<remote url> |
URL of a remote Git repository. Used with the |
To create the pull repository of the Using remote Git hosting type associated with the remote repository http://code.pp.plesk.ru/plesk/demo.git on the domain domain.com: plesk ext git --create -domain domain.com -name pull -remote-url http://code.pp.plesk.ru/plesk/demo.git |
-active-branch |
<active branch> |
Active branch. Used with the |
To change the active branch of the repository example on the domain example.com: plesk ext git --update -domain example.com -name example -active-branch dev |
-deployment-mode |
<auto|manual|none> |
Switching the deployment mode: automatic deployment ( Used with the |
To switch on the automated deployment for the repository example on the domain example.com: plesk ext git --update -domain example.com -name example -deployment-mode auto |
-skip-ssl-verification |
<true|false> |
Switching skipping SSL/TLS verification on (true) or off (false). Used with the |
To skip SSL/TLS verification for the repository example1 on the domain example.com: plesk ext git --update -domain example.com -name example1 -skip-ssl-verification true |
-actions |
</path/to/actions-file.txt> |
Path to the file with additional deployment actions. Use with the |
To create the repository repo1 on the domain example.com with the additional deployment actions listed in the file actions.txt: plesk ext git -c -domain example.com -name repo1 -actions ./actions.txt |