diff options
author | dweller <dweller@cabin.digital> | 2024-03-09 02:50:22 +0200 |
---|---|---|
committer | dweller <dweller@cabin.digital> | 2024-03-09 02:50:22 +0200 |
commit | 9b9bda8bb3700b25007a1b78958a2a4ac7c2f9cb (patch) | |
tree | 894a24c89afdff8eae712307bc186b83cd6b0044 /README |
Initial commit
Diffstat (limited to '')
-rw-r--r-- | README | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -0,0 +1,34 @@ +gitscripts +---------- + +Collection of scripts that make it easier to manager self-hosted git server. + + +If you have a git server, and you don't like the idea of running large web frontends, but still want +to be able to do something as basic as create a new remote (bare) repository this might be for you. + +Install/Usage: + 1. Create a 'git' user (or any other name, but you'll have to substitute henceforth) + I use git's $HOME to store my repositories, but you can either change git's $HOME on creation + or just change PREFIX in the scripts; + + 2. `chsh -s $(command -v git-shell) git` to change 'git' to use git-shell (this will restrict + the user to use only the git related commands we allow); + + 3. Clone this repository and `cp -r git-shell-commands /home/git`, without this folder and + scripts in it, git-shell won't be interactive (see git-shell(1) man page). + - help: just prints the contents of git-shell-commands directory; + - mkrepo: creates a new bare repository at given path and optionally provides description; + - setdesc: sets/changes a repository's description. + + 4. That's it for the remote, now copy (or `ln -s` from this repo) `git-description` and + `git-mkremote` to somewhere that is in your $PATH. Now you can access them by calling + `git mkremote/descremote`. All of them provide usage example when called without arguments; + + 5. That's it! Now you can create remotes easily from the comfort of your terminal, like a normal + terminally terminal person. + +NOTICE: + The git-shell scripts provide access for anyone with ssh access to git user to create folders + and initialize repositories anywhere on your system with lax permissions! Maybe chroot(1)ing + your git server could be a good idea, or maybe if it's just a personal git sever this is okay. |