wikmd: Docker setup fails with Git Error

Running wikmd as docker container with following error.

wikmd    | [2022-05-28 19:35:41,212] INFO in git_manager: Initializing existing repo >>> wiki ...
wikmd    | [2022-05-28 19:35:41,212] INFO in git_manager: Creating 'main' branch ...
wikmd    | [2022-05-28 19:35:41,216] ERROR in git_manager: Existing repo initialization failed >>> Cmd('git') failed due to: exit code(128)
wikmd    |   cmdline: git branch -M main
wikmd    |   stderr: 'fatal: unsafe repository ('/app/wikmd/wiki' is owned by someone else)
wikmd    | To add an exception for this directory, call:
wikmd    |
wikmd    |      git config --global --add safe.directory /app/wikmd/wiki'

Troubleshooting done,

  1. Configured PID GID to current user
  2. Ensured path/to/wiki has correct permission

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

Hey, no problem. A quick search seem to point to a recent change in git. It has affected a lot of other projects. I’m not at my computer so I can’t debug that right now but the permissions are set here for new repo created from the example. I’ll give it a look on Monday 👍.

hi @belibug

This problem should be solved in 4c659cad28f8b96c02ffcc7c615b85083aaa1ab8.

@artivis I tried building from docker file, It worked for most part but failed to rename branch which is same as issue #44 which I see you opened.

wikmd    | [2022-06-09 03:37:18,438] INFO in git_manager: Initializing existing repo >>> /wiki ...
wikmd    | INFO in git_manager: Creating 'main' branch ...
wikmd    | ERROR in git_manager: Existing repo initialization failed >>> Cmd('git') failed due to: exit code(128)
wikmd    | cmdline: git branch -M main
wikmd    | stderr: 'error: refname refs/heads/master not found
wikmd    | fatal: Branch rename failed'

Alright, I’ll look into it. Thanks for the quick response, appreciate it!

Hi @belibug , the docker image has known issues. I’m working on it to resolve it. For now I would suggest running it native on your machine if possible to get the best experience.