Giter Site home page Giter Site logo

Comments (2)

alexef avatar alexef commented on June 3, 2024

@timvink sorry, how did you fallback to builddate?

from mkdocs-git-revision-date-localized-plugin.

timvink avatar timvink commented on June 3, 2024

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:

except GitCommandError as err:
if self.config.get('fallback_to_build_date'):
log(
"[git-revision-date-localized-plugin] Unable to read git logs of '%s'. Is git log readable?"
" Option 'fallback_to_build_date' set to 'true': Falling back to build date"
% path
)
commit_timestamp = time.time()

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

from mkdocs-git-revision-date-localized-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.