timwis / jkan

A lightweight, backend-free open data portal, powered by Jekyll
https://jkan.io
MIT License
218 stars 310 forks source link

Fix git permissions so gh-pages can pull info from git-remotes #257

Closed BryanQuigley closed 1 year ago

BryanQuigley commented 1 year ago

Related: #254

netlify[bot] commented 1 year ago

Deploy Preview for jkan-demo ready!

Name Link
Latest commit 9ad5f720bace22cf94142de95ba62984b4ef32de
Latest deploy log https://app.netlify.com/sites/jkan-demo/deploys/6410c877ca26cb00086577bc
Deploy Preview https://deploy-preview-257--jkan-demo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

timwis commented 1 year ago

Wow! This is fascinating... I haven't encountered this git feature yet. It looks like it was released about a year ago. What's particularly curious is:

  1. When I run git --version inside the docker container, I get git version 2.30.2, but from what I can tell, this safe directory feature wasn't released until at least version 2.30.5... are you somehow running a different version of git in your docker image?
  2. /srv/jekyll is owned by root, and the user running the docker image is root, so I don't understand why that git feature would even be concerned.

The only thing I can think of, which doesn't quite explain the above, are:

I wouldn't let this block your development, of course; just a fascinating little bug that I unfortunately can't reproduce and debug myself.... happy for you to merge this in the meantime, particularly if your curiosity about this is not as strong (ridiculous?) as mine!

BryanQuigley commented 1 year ago
  1. I was really expecting to be git versions..but: docker compose exec jekyll git --version git version 2.30.2

2.. The files inside are owned by whatever your uid is on the local machine. docker compose exec jekyll ls -al /srv/jekyll/.gitignore -rw-rw-r-- 1 1001 1001 106 Mar 3 21:07 /srv/jekyll/.gitignore

I've added some other changes from your notes above: