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

error in staging : --max-count=10 #108

Open
paubou opened this issue Apr 29, 2024 · 2 comments
Open

error in staging : --max-count=10 #108

paubou opened this issue Apr 29, 2024 · 2 comments

Comments

@paubou
Copy link

paubou commented Apr 29, 2024

Getting this error on Kirby 4.2 :
Command 'LC_ALL=C git log '--pretty=format:%H|%s|%an|%ae|%cI' '--max-count=10'' failed (exit-code -1).

It's working great locally, but as soon as I deploy to my staging env, it's giving me the error...

@paubou paubou changed the title '--max-count=10 error in staging : --max-count=10 Apr 29, 2024
@thathoff
Copy link
Owner

Can you try to run the command on the server as the webserver’s user? Mostly this is related to an old git version on the server.

@svenk
Copy link

svenk commented Jul 16, 2024

I got the same error message and in fact, it was the reason of a host OS (i.e. linux) user mismatch. The actual output which you only get on the command line invoking this command is then something like

fatal: detected dubious ownership in repository at '/home/foo/bar/baz'
To add an exception for this directory, call:

        git config --global --add safe.directory /home/foo/bar/baz

The solution is, as @thathoff said, to make sure that the .git directory is owned by the same system user who is running the PHP process (for instance www-data on a classical linux php-fpm or LAMP system).

It would be very good if the error message in the panel captured this stderr thrown by git so users get an idea what the actual error is. exit-code 128 is just telling nothing.

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