klaussilveira / gitlist

An elegant and modern git repository viewer
https://gitlist.org/
BSD 3-Clause "New" or "Revised" License
2.92k stars 520 forks source link

Can't list repositories #923

Closed wykasz closed 1 year ago

wykasz commented 1 year ago

Repository created with git version 2.30.2 under /var/www/gitr/projecta/repoa with www-data owner. gitlist 2.0.0 installed on debian 11 with php 8.1 (fpm) and nginx pointing to /var/www/git/public

Config

 # List of directories containing repositories
  default_repository_dir: /var/www/gitr/projectc/repoa
  repositories:
    - '%env(default:default_repository_dir:DEFAULT_REPOSITORY_DIR)%'

Result: image

Changing repository_depth: '0'` to 1 or changing path doesn't help.

klaussilveira commented 1 year ago

You have mentioned /var/www/gitr/projecta/repoa, but your config lists /var/www/gitr/projectc/repoa. Regardless of that, you should be listing folders that contain repository folders. So I'm assuming:

/var/www/gitr/projecta
/var/www/gitr/projectc

Just use that as values for your repositories value. You can also see how the Finder is configured to search on those paths:

https://github.com/klaussilveira/gitlist/blob/9bf0e0c2fe553243433481de90989886344d2515/src/Repository/Index.php#L25

iamnatalie commented 1 year ago

This Nginx works: **install php, php-fpm, nginx. ubuntu 22

server {
    listen 80 default_server;
    listen [::]:80 default_server;
    root /var/www/gitlist/public;
    index index.php index.html index.htm index.nginx-debian.html;
    location / {
        try_files $uri /index.php$is_args$args;
    }
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;

        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
    }
}