caddy-git
caddy-git copied to clipboard
Problems with setting up github hook
caddy-git seems really cool but I am at the third unsuccessful attempt at setting it up. This time I decided to ask for help before giving up.
Following is my git block in my Caddyfile.
git {
repo https://github.com/repo/path.git
key /etc/caddy/keys/my_id_rsa
hook /publish "my_key"
path /opt/build-dir
then hugo --destination=/var/www/blog
}
I suspect following errors in my log are from caddy-git
mkdir: cannot create directory '/var/www/.ssh': Permission denied
touch: cannot touch '/var/www/.ssh/known_hosts': No such file or directory
/tmp/caddy839530012: line 5: /var/www/.ssh/tmp_hosts: No such file or directory
/tmp/caddy839530012: line 6: /var/www/.ssh/known_hosts: No such file or directory
Anyhow, the push endpoint gives 404. Any help?
What operating system or linux distro are you using ?
Ubuntu 16.04
Were you able to solve this?
I'm having issues with that one too. Although I have the hook set up in my caddy config file, every time either GitHub or myself tries to hit it it results in a 404 error... Did any of you solve this since then?
My main issue is finding time to reproduce this. I'll see if I can do that this weekend. And if I am able to reproduce it, I will issue a fix straight away.
I recently moved my Caddy server to a new host, with the exact same configuration, and now the webhook works... Weird... FWIW the only difference I can think of between the two hosts is that the first one was running Archlinux and the second one Ubuntu.
You should check if the user www-data have the w permission of the directory /var/www/