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

Compatibility with etckeeper repository #566

Closed
xpac1985 opened this issue Mar 9, 2015 · 2 comments
Closed

Compatibility with etckeeper repository #566

xpac1985 opened this issue Mar 9, 2015 · 2 comments

Comments

@xpac1985
Copy link

xpac1985 commented Mar 9, 2015

I guess most of you know etckeeper - a Linux tool to keep /etc/ under version control.

Trying to use gitlist to show me that repository, I continously fail :)

Setting the repository directory to '/etc/' makes nginx log:

2015/03/09 23:07:53 [error] 32212#0: *28 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught exception 'RuntimeException' with message 'There are no GIT repositories in /etc/' in /var/www/subdomain.domain.net/gitlist/src/GitList/Git/Client.php:42

Stack trace:
# 0 /var/www/subdomain.domain.net/gitlist/src/GitList/Util/Routing.php(122): GitList\Git\Client->getRepositories(Array)
# 1 /var/www/subdomain.domain.net/gitlist/src/GitList/Controller/MainController.php(48): GitList\Util\Routing->getRepositoryRegex()
# 2 /var/www/subdomain.domain.net/gitlist/vendor/silex/silex/src/Silex/Application.php(492): GitList\Controller\MainController->connect(Object(GitList\Application))
# 3 /var/www/subdomain.domain.net/gitlist/boot.php(7): Silex\Application->mount('', Object(GitList\Controller\MainController))
# 4 /var/www/subdomain.domain.net/gitlist/index.php(28): require('/var/www/murmel...')
# 5 {main}
 
  thrown in /var/www/subdomain.domain.net/gitlist/src/GitList/Git/Client.php on line 42" while reading response header from upstream, client: 37.24.156.207, server: subdomain.domain.net, request: "GET /gitlist/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "subdomain.domain.net"

Setting the repository directory to '/etc/.git/' makes nginx log:

2015/03/09 23:14:14 [error] 32212#0: *32 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(/etc/.git/): failed to open dir: Permission denied' in /var/www/subdomain.domain.net/gitlist/src/GitList/Git/Client.php:58

Stack trace:
# 0 /var/www/subdomain.domain.net/gitlist/src/GitList/Git/Client.php(58): DirectoryIterator->__construct('/etc/.git/')
# 1 /var/www/subdomain.domain.net/gitlist/src/GitList/Git/Client.php(39): GitList\Git\Client->recurseDirectory('/etc/.git/')
# 2 /var/www/subdomain.domain.net/gitlist/src/GitList/Util/Routing.php(122): GitList\Git\Client->getRepositories(Array)
# 3 /var/www/subdomain.domain.net/gitlist/src/GitList/Controller/MainController.php(48): GitList\Util\Routing->getRepositoryRegex()
# 4 /var/www/subdomain.domain.net/gitlist/vendor/silex/silex/src/Silex/Application.php(492): GitList\Controller\MainController->connect(Object(GitList\Application))
# 5 /var/www/subdomain.domain.net/gitlist/boot.php(7): Silex\Application->mount('', Object(GitList\Controll" while reading response header from upstream, client: 37.24.156.207, server: subdomain.domain.net, request: "GET /gitlist/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "subdomain.domain.net"

Any idea how this combination can be made work, or is this some kind of bug in GitList?

I can exclude the possibility that it is related to my nginx config, as it works fine when cloning some random repository from the web to a new folder.

Thanks a lot in advance

@Grinnz
Copy link

Grinnz commented Mar 10, 2015

Are you running SELinux? Webservers should usually not need to read anything in /etc except their own config.

@xpac1985
Copy link
Author

xpac1985 commented Mar 10, 2015

No SELinux, simply Debian Wheezy. Just to check if it helps, I chowned the /etc/.git/ folder to the group www-data (which nginx uses) - didn't help...
Maybe I'm missing something obvious, I'm still rather new to Linux...

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

3 participants