- Generate ssh keys for
www-data:
sudo mkdir /var/www/.ssh
sudo chown -R www-data /var/www/.ssh
sudo -u www-data ssh-keygen -t rsa
- Add that ssh key to the
Deploy keysfor your account or repo - Put this WebhookController into your app and fill the secret with random data
- Create Webhook, put secret from controller into the
Secretfield.URLhas to be like this:
site.com/webhook
- Add access to your repo for
www-datauser:
chown -R www-data /var/www/yourrepo/
All done!