Fetching the Remote Repository

The fetch operation is used to fetch the changes from a remote repository to a Git repository. This is applicable only to repositories of the Using remote Git hosting type.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet fetching changes from a remote repository, includes the fetch operation node:

<packet>
  <extension>
    <call>
      <git>
        <fetch>
          ...
        </fetch>
      </git>
    </call>
  </extension>
</packet>

The fetch node has the following structure:

  • The domain node is required. It specifies the domain. Data type: string.
  • The name node is required. It specifies the repository name. Data type: string.
 

Response Packet Structure

The fetch node of the output XML packet is structured as follows:

<packet>
  <extension>
    <call>
      <result>
        <status>...</status>
        ...
        <git>
          <fetch>
        </git>
      </result>
    </call>
  </extension>
</packet>
  • The result node is required. It wraps the response received from the server. This node contains the following nodes:
    • The status node is required. It specifies the execution status of the fetch operation. Data type: result_status. Allowed values: ok | error.
    • The errcode node is optional. It is used to return the error code when the fetch operation fails. Data type: unsignedInt.
    • The errtext node is optional. It is used to return the error message if the fetch operation fails. Data type: string.
    • The git node is required and contains the fetch node.
 

Samples

This packet fetches a remote repository for a Git repository.

<packet>
  <extension>
    <call>
      <git>
        <fetch>
          <domain>example.com</domain>
          <name>demogit</name>
        </fetch>
      </git>
    </call>
  </extension>
</packet>

Response:

<packet>
  <extension>
    <call>
      <result>
        <status>ok</status>
        <git>
          <fetch/>
        </git>
      </result>
    </call>
  </extension>
</packet>
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.