Skip to content

Commit

Permalink
Document work-around for creating initial admin user
Browse files Browse the repository at this point in the history
We should make it obvious that creating the initial admin user is a
known problem and outline a work-around.
  • Loading branch information
jerrykan committed Jan 27, 2017
1 parent 3db9ffb commit 1e92f45
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,43 @@ Formula to set up and configure the Gogs self-hosted Git service.
See the full `Salt Formulas installation and usage instructions
<http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.

Notes
=====

Gogs currently has no good way to automate the creation of the initial admin
user. As a work-around until a solution can be found the following manual steps
can be performed:

#) Set the gogs config directory to be world writable so that the installer can
write to it::

chmod 777 /etc/gogs

#) Edit the ``/etc/gogs/app.ini`` file to enable the installer::

30c30
< INSTALL_LOCK = true
---
> INSTALL_LOCK = false


#) Browse to ``http(s)://<hostname>/install`` to run the installer and set up
an admin account.

#) Run salt to reconfigure the ``/etc/gogs/app.ini`` file and set the correct
permissions on the config directory::

salt-call state.apply --output-diff

----

Alternatively you could manually create the admin user by inserting a new row
in the ``user`` table in the database. Some details on this can be found in the
followin puppet gogs module:

* https://github.com/Siteminds/puppet-gogs#special-notes


Available states
================

Expand Down

0 comments on commit 1e92f45

Please sign in to comment.