Hello, I just spent a couple of hours setting up a self-hosted instance of git.sr.ht. First, a quick note: it was impossible to use ssh to pull/push to git repos unless I added a password to the `git` user on a fresh alpine install. Maybe this should be documented? I can send a patch if needed. Now onto my issue: I can't clone using https. Here's the log from the git clone command: $ git clone https://git.srht.augendre.info/~crocmagnon/test Cloning into 'test'... remote: 403 Forbidden fatal: unable to access 'https://git.srht.augendre.info/~crocmagnon/test/': The requested URL returned error: 403 I found nothing in the logs, only the 403 request in nginx/access.log. Nothing appears in git.sr.ht.log. Here's my git.sr.ht nginx conf: https://paste.sr.ht/~crocmagnon/2d75fbf675d4bc4a32d1a89fbec6585a9be3bfb5 Permissions on the fcgiwrap socket seem ok (root is part of www-data): srwxrwxr-x 1 fcgiwrap www-data 0 Nov 20 20:17 /var/run/fcgiwrap/fcgiwrap.sock Thanks for the help! -- Gabriel Augendre
A few things I forgot to mention: * The repo is public * I have another nginx to handle all my incoming http(s) traffic before git.sr.ht's. Here's the config: https://paste.sr.ht/~crocmagnon/b403d67a5c716d74bf3cd00e301ca329d81961ca In this config, http://192.168.0.56:80 is the git.sr.ht host. -- Gabriel Augendre
Check your logs in /var/log/gitsrht-* These files need to (1) exist and (2) be writable by git:git, neither of which is done for you (sorry)
Yeah I noticed some issues when cloning with ssh indeed, I created and chowned the ones that were mentioned in stderr. Could you please list all the files that should exist? Maybe I’m missing some? -- Gabriel Augendre Sent from a mobile device / Envoyé depuis un appareil mobile
gitsrht-shell, gitsrht-dispatch, gitsrht-keys, gitsrht-update-hook. That should be all of them, I think.
Thanks, Here's what I have: -rw-r--r-- 1 git git 4.4K Nov 20 21:22 git.sr.ht.log -rw-r--r-- 1 git git 13.7K Nov 21 08:29 gitsrht-dispatch -rw-r--r-- 1 git git 23.5K Nov 21 08:29 gitsrht-keys -rw-r--r-- 1 git git 4.9K Nov 21 08:29 gitsrht-shell -rw-r--r-- 1 git git 648 Nov 20 21:07 gitsrht-update-hook I did a `tail -f git*` and tried to `git clone` with https but nothing moved. -- Gabriel Augendre
Hm, try the nginx logs.
Sadly nothing useful, at least I guess tail -f /var/log/nginx/* ==> nginx/access.log <== 192.168.0.10 - - [21/Nov/2020:15:16:44 +0100] "GET /~crocmagnon/test/info/refs?service=git-upload-pack HTTP/1.0" 403 15 "-" "git/2.29.2" "[some ipv6 address]" -- Gabriel Augendre
Not sure what to tell you. Double check your fcgiwrap config, and start debugging.
I'll try that :) Do you have any hint on how to "start debugging"? Maybe just some search engine for "debug fcgiwrap"? Thanks again, I'll post here when I find a solution. -- Gabriel Augendre