Skip to content

Running Docker image results in error due to git security configuration #2006

@purp

Description

@purp

Please read the CONTRIBUTION GUIDELINES before submitting!

Describe the bug
When attempting to run gollum using the gollumwiki/gollum:master image in Docker Hub and following the instructions in either the Gollum via Docker wiki page or the previous revision of the Gollum via Docker Compose wiki page the following error occurs:

application error: Rugged::ConfigError at /  repository path '/wiki/' is not owned by current user file: git_layer_rugged.rb location: new line: 596

This seems to be due to the changes made to git in response to CVE-2022-24765. I was able to work around it by adding a .gitconfig file for the container user which marks /wiki as a safe directory. I documented this workaround in the current revision of the Gollum via Docker Compose wiki page.

To Reproduce

  1. Follow the steps in the "Gollum via Docker" or "Gollum via Docker Compose" wiki pages mentioned above.
  2. Attempt to load the main page of the server
  3. See the error message

Expected behavior
Initial server load with a blank git repo should result in loading the "Create Page" page with a default title of "Home"

Screenshots
See above.

Environment Info

/wiki $ gollum --versions
Gollum 5.3.0
Running on: aarch64-linux-musl with Ruby version 3.1.4
Using:
rugged 1.7.1
gollum-rugged_adapter 3.0
gollum-lib 6.0
Markdown rendering gem: kramdown
Other rendering gems:
RedCloth 4.3.2
org-ruby 0.9.12
creole 0.5.0
asciidoctor 2.0.20
wikicloth 0.8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions