WEB-INF/data/gitblit.properties
.WEB-INF/data/gitblit.properties
in your favorite text editor and make sure to review and set:
By default, Gitblit WAR stores all data (users, settings, repositories, etc) in ${contextFolder}/WEB-INF/data
. This is fine for a quick setup, but there are many reasons why you don’t want to keep your data within the webapps folder of your servlet container. You may specify an external location for your data by editing WEB-INF/web.xml
and manipulating the baseFolder context parameter. Choose a location that is writeable by your servlet container. Your servlet container may be smart enough to recognize the change and to restart Gitblit.
On the next restart of Gitblit, Gitblit will copy the contents of the WEB-INF/data
folder to your specified baseFolder IF the file ${baseFolder}/gitblit.properties
does not already exist. This allows you to get going with minimal fuss.
Specifying an alternate baseFolder also allows for simpler upgrades in the future.