Using gollum to modify gitlab wiki's


I’m using:

  • ubuntu 20.04

  • GitLab Community Edition 14.1.2

  • Gollum 5.2.3

Gitlab and Gollum are installed via the ubuntu packet manager:

sudo apt-get install ruby ruby-dev make zlib1g-dev libicu-dev build-essential git cmake libssl-dev
sudo gem install gollum

When I manually create an empty git repository:

mkdir tester
cd tester
git init

I can reach, add and modify the repository via firefox using the url:


When I export a gitlab wiki:

git clone git@gitlab1.vhel.invalid:vhelmont/grea


I can reach the repository via firefox using the url:


But the url opens with the file although this file doesn’t exists in the gitlab wiki repository.
When I enter some data in it and save the file, the file and its modifications don’t appear in the directory.
The command:

git status

tells me that the file is added and deleted:

git status
On branch main
Your branch is up to date with ‘origin/main’.

Changes to be committed:
(use “git restore --staged …” to unstage)
new file:

Changes not staged for commit:
(use “git add/rm …” to update what will be committed)
(use “git restore …” to discard changes in working directory)

Does somebody else see this strange behaviour and how can it be fixed?



I haven’t used Gollum yet, a quick search for gollum brought up this issue with a default setting override: [question]: is there a way to change the default · Issue #1569 · gollum/gollum · GitHub

Maybe the below works, untested:

$ vim config.rb

Precious::App.set(:wiki_options, { :index_page => 'README' })

$ gollum --config config.rb


Hello Michael,

Thanks for the tip.
A config.rb file containing:

Precious::App.set(:wiki_options, { :index_page => '' })

indeed makes the gollum web interface start by opening the file instead of the file.

There seems to be an additional issue.
The gitlab wiki creates main as the top branch while gollum expects master to be the top branch. This gives problems when you save your changes in the gollum web interface who tries to commit the changes to the non existing master branch.

A quick an dirty solution is to checkout a new master branch when in the main branch do your thing in the gollum web interface and when finished merge the master branch back into the main branch.

This is a complicated solution for the problem. Would it be possible to add an additional command to the config.rb file forcing gollum to work with the main branch instead of the master branch.


I found the answer to my question. You have to start gollum with the –ref option. In my case this becomes:

gollum --config config.rb --ref main


1 Like