Koumbit.org

For freedom and solidarity online

How do I use git with a site in Aegir?

To use git, the site needs to be created with details in the section "Deploy from git" filled out. Note: you cannot use git with sites that are linked to your SFTP account. If your site already exists and you want to link it to git, you should contact us and we'll help you get it set up.

Create new repository & host it somewhere

Per-site git repos start at the site folder within a Drupal multi-site. They should exclude settings.php, drushrc.php, and the files/ and private/ folders. An example setup follows:

mkdir monsite && cd monsite
git init .
echo " \
settings.php \
files/ \
private/ \
drushrc.php" > .gitignore
mkdir modules && touch modules/.gitkeep
mkdir themes && touch themes/.gitkeep
mkdir libraries && touch libraries/.gitkeep
git add .
git commit -m "Initial commit"

Your site code must be published somewhere which is accessible to the Aegir hostmaster. You can host private projects in our redmine instance or somewhere like GitHub or GitLab. For private repositories, you may need to add a public key to your repository settings for Aegir to access it properly.

Add an origin to the repository you created above (the url comes from a project in redmine), and push there.

git remote add origin gitolite@git.koumbit.net/monsite.git
git push -u origin master

Enter the details when making a new site in Aegir

You will require: the repository url, the branch you want to deploy, and to choose how you want pulls to be done. Unless you're doing automatic testing and deployment, you can select "Manual" to control by hand when a pull happens.

Save the new site, and it should be installed with the git repo. If the aegir hostmaster does not have access to the repository, the install will fail. Contact us for help if you're not sure.

Call us

☏ +1 514 907 9494
Lun: 10h à 12h et 13h à 16h
Mar: 10h à 12h
Mer: 10h à 12h et 13h à 16h
Jeu: 10h à 12h
Mon: 10am to 12pm and 1pm to 4pm
Tue: 10am to 12pm
Wed: 10am to 12pm and 1pm to 4pm
Thu: 10am to 12pm

Come and See Us!

1883, rue Atateken,
Montréal (Québec) H2L 3L7, Canada
Veuillez noter que nos bureaux n'ont pas de stationnement attitré.
1883 Atateken Street,
Montreal, Quebec, H2L 3L7, Canada
Please note that you'll need to find on-street parking.

Write to Us

Informations générales

Support technique

Pour une demande de devis, voir le formulaire à la page contact.

Nos clefs PGP

General inquiries

Technical support

For a free estimate, see the form on our contact page.

Our PGP keys

Follow Us

ktweb_menu_social