Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with setting up github hook #81

Open
chanux opened this issue Jan 13, 2018 · 7 comments
Open

Problems with setting up github hook #81

chanux opened this issue Jan 13, 2018 · 7 comments

Comments

@chanux
Copy link

chanux commented Jan 13, 2018

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?

@abiosoft
Copy link
Owner

What operating system or linux distro are you using ?

@chanux
Copy link
Author

chanux commented Jan 14, 2018

Ubuntu 16.04

@griffins
Copy link

Were you able to solve this?

@babolivier
Copy link

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?

@abiosoft
Copy link
Owner

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.

@babolivier
Copy link

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.

@wwyf
Copy link

wwyf commented Nov 23, 2019

You should check if the user www-data have the w permission of the directory /var/www/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants