Skip to content
xYnta
Go to websitexynta.com
Search
EN

Adding a Git repository

Updated on

With Git you link a repository, for example from GitHub, GitLab or Bitbucket, to your hosting package. The control panel fetches the code and puts the files in the folder you choose.

Web Hosting (DirectAdmin)

Also for Reseller Hosting.

  1. Log in to DirectAdmin via Single Sign-On from Mijn xYnta, or at https://yourdomain.nl:2222.
  2. Under Advanced Features, click Git.
  3. At the top right, click CREATE REPOSITORY.
  4. Under Name, enter a name for the repository.
  5. Under Remote, enter the address of the repository (the URL ending in .git). Keyfile is only needed for a private repository.
  6. Click CREATE REPOSITORY. DirectAdmin clones the repository to domains/yourdomain.nl/ under the name you chose.
  7. In the list, click the name of the repository and then MODIFY.
  8. Under Deploy Branch, choose the branch, for example main or master, and under Deploy Directory enter the folder the files should go to, for example domains/yourdomain.nl/public_html/app. Click SAVE.
  9. Click DEPLOY. DirectAdmin puts the files in the folder and reports Deployment completed.

Later, FETCH fetches new changes from the repository, and DEPLOY puts them in the folder.

Note: a new folder that DirectAdmin creates when deploying gets the permissions 700. Visitors then get an error: set the permissions of that folder to 755 (see Resetting file permissions on your hosting package).

WordPress Hosting (Plesk)

  1. Log in to Plesk at https://whs1.srvnl.nl:8443. You can find your server name in How can I find the server name of my hosting package?
  2. On the Dashboard tab, under Dev Tools, click Git.
  3. Click Add Repository.
  4. At the top, choose Remote repository.
  5. Under Repository URL, enter the address of the repository. If the repository is protected with a username and password, enter them under Username and Password.
  6. Under Deployment settings, choose Automatic for Deployment mode.
  7. Under Deployment directory, enter the folder the files should go to.
  8. Click Create.

Plesk clones the repository and puts the files in the folder. Later, Pull now fetches new changes, and Deploy now puts them in the folder again.

Note: Deployment directory is set to /httpdocs by default, the folder of your website. Choose a folder of its own, unless the repository contains your whole website.

The page of a repository in DirectAdmin
A repository in DirectAdmin, with FETCH, DEPLOY and MODIFY, and the branch and folder for deploying.

Video

Adding a Git repository in DirectAdminYouTube
Adding a Git repository in PleskYouTube

Related articles