pub / stagit-scripts

Building with stagit
git clone
Log | Files | Exports | Refs | README | RSS

Activity: Sep, 2021 - Jul, 2024

Less More


Please send patches or remarks to jayvii+stagit-scripts[AT]posteo[DOT]de

Some scripts and assets to run


|- bin/
|  |-        Creates A bare repository and HTML viewer
|  |-          Used as post-push hook in repositories
|  |-      Trigger post-update hook in all repositories
|  |-      Sets necessary URL to clone via http(s)
|  |-  Updates the repository overview HTML page
|  |-   Updates the respository HTML viewer pages
|  '-        Updates git information to clone via http(s)
|- assets/
|  |- favicon.png               Favicon and Logo of the page
|  |- backicon.png              Logo for the "back" button in repos
|  |- style.css                 CSS for the HTML viewer
|  '- index.css                 CSS for the file index viewer
|- 404.html                     404 Page
|- index.html                   Index-Page for the Main site, redirects to /pub/
|- .htaccess                    htaccess file with defaults for security
'- .gitignore                   Files to be ignored when checking out git

There are additional links for CSS and icon files.


  1. Install on your Server

  2. Use this template:

  1. Setup the HTML Root:
  1. Setup git-user:

Private Repositories

Private repositories reside within /prv, while your public repositories are in /pub. Access to the private repositories is restricted via HTTP Basic Authentication.

A .htaccess file is provided within the /prv directory, however you also need to set up a user/password for the web-access, e.g. here for the user “username”:

Optional Tweaks

Set your stagit server’s URL via the “url” file:

You may also setup SSH-credentials for the user or SSH-Auth keys.

You most likely want to setup a webserver (e.g. Apache2) with “/var/www/” (home of user “git”) as its root-dir.

As long as user “git” is in the group “www-data”, file permissions should generally be no problem. For good measure, you may however still set up cron-job that enforces file permissions every now and then. In crontab, use following entries (assuming your git-folder is located in “/var/www/”):

0 0 * * * chown git:www-data -R /var/www/
0 0 * * * chmod 770 -R /var/www/


You’ll find a post-update hook example in the “examples/hooks/” directory.

'- hooks/
|- post-update.sample1    Automatic packaging and deployment
'- post-update.sample2    REUSE linting on push

Further notes

New repositories can be created via the webform in “/create_repo/index.html” or via an according GET request to that PHP-script:

The “/create_repo/” endpoint is restricted to authenticated users via htaccess (just like the “/priv/” repositories). A GET request therefore has to supply the authentication credentials accordingly.


stagit-scripts is licensed under AGPL-3.0-or-later.

Bundled Assets

favicon.png & backicon.png are modified versions of materialdesignicons and are licensed under Apache-2.0.

stagit ( and some of its assets used here are licensed under MIT.

Clone this repository via:
git clone