Open timvink opened 1 year ago
@timvink sorry, how did you fallback to builddate?
Sorry, should have been more clear. The error from this plugin is the first line:
ERROR - [git-revision-date-localized-plugin] Unable to read git logs of '/workspace/source-repo/docs'. To ignore this error, set option 'fallback_to_build_date: true'
That's caused by this (too generic) bit of code:
The traceback actually already has the correct solution (last line):
git config --global --add [safe.directory](http://safe.directory/) /workspace/source-repo'
I created the issue to remember when I next touch this plugin, to improve the error handling, but because the "Solution is not fallback to builddate".
This issue pops up for people with newer versions of git
, and the solution (that I also contributed to the mkdocs-material docker image) is basically these two lines:
# Trust directory, required for git >= 2.35.2
# Run this inside the root of your project
# Remember to update any CI/CD pipelines also
git config --global --add safe.directory /docs
git config --global --add safe.directory /site
I had this stacktrace:
Solution is not fallback to builddate, so we should improve the error message