| @@ -11,7 +11,7 @@ Small and lightweight git server for self hosting. Repositories are served over |
| 11 | 11 | - Forks and pull requests from either a branch or a fork. Discussion comments and inline review comments on any line of the diff are Markdown, review threads can be resolved and go to an outdated section when the line leaves the diff, and a request can be closed or reopened or brought up to date from its source at any point |
| 12 | 12 | - Three merge strategies, a merge commit with an editable message, a squash authored by the request author, or a rebase that replays each commit onto the target. All three are built from `merge-tree` and `commit-tree` without a working tree and fail cleanly on conflict |
| 13 | 13 | - Collaborators per repository who can push, read it when private and merge pull requests, while settings and deletion stay with the owner |
| 14 | | -- A per user disk quota set with `basin quota 2G` and enforced on push over both transports |
| 14 | +- A per user disk quota set with `gitpocket quota 2G` and enforced on push over both transports |
| 15 | 15 | - Signature verification for both SSH and PGP. Register the key in settings, sign commits with it, and they show `Verified ~you`. PGP keys are imported into a server keyring and matched by primary fingerprint, SSH keys through an allowed signers file matched by fingerprint. Keys are public at `~you.keys` and `~you.pgp` |
| 16 | 16 | - Issues per repository with Markdown bodies and comments, open and closed states, and an open count in the tab strip |
| 17 | 17 | - Stars, so a profile shows what someone found worth keeping, and a star count next to every repository title |
| @@ -38,18 +38,18 @@ SQLite comes from the modernc port, which is pure Go, so a `CGO_ENABLED=0` build |
| 38 | 38 | ## Install |
| 39 | 39 | |
| 40 | 40 | ``` |
| 41 | | -CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o basin . |
| 42 | | -useradd -r -m -d /srv/basin -s /bin/sh git |
| 43 | | -install -m 755 basin /usr/local/bin/basin |
| 41 | +CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o gitpocket . |
| 42 | +useradd -r -m -d /srv/gitpocket -s /bin/sh git |
| 43 | +install -m 755 gitpocket /usr/local/bin/gitpocket |
| 44 | 44 | ``` |
| 45 | 45 | |
| 46 | 46 | ``` |
| 47 | 47 | [Service] |
| 48 | 48 | User=git |
| 49 | | -ExecStart=/usr/local/bin/basin -root /srv/basin serve -listen 127.0.0.1:3200 -host git.example.org |
| 49 | +ExecStart=/usr/local/bin/gitpocket -root /srv/gitpocket serve -listen 127.0.0.1:3200 -host git.example.org |
| 50 | 50 | Restart=always |
| 51 | 51 | ProtectSystem=strict |
| 52 | | -ReadWritePaths=/srv/basin |
| 52 | +ReadWritePaths=/srv/gitpocket |
| 53 | 53 | ``` |
| 54 | 54 | |
| 55 | 55 | Put a reverse proxy with TLS in front of it. The proxy needs to forward `Host` and `X-Forwarded-Proto`, and it should set `X-Forwarded-For` to the client address rather than appending to it because the rate limiter keys on the first value it finds there. Turn request buffering off and raise the body limit as well, otherwise larger pushes over HTTPS will be cut short. |
| @@ -58,28 +58,28 @@ Put a reverse proxy with TLS in front of it. The proxy needs to forward `Host` a |
| 58 | 58 | Match User git |
| 59 | 59 | AuthenticationMethods publickey |
| 60 | 60 | AuthorizedKeysFile none |
| 61 | | - AuthorizedKeysCommand /usr/local/bin/basin -root /srv/basin keys %u %h %t %k |
| 61 | + AuthorizedKeysCommand /usr/local/bin/gitpocket -root /srv/gitpocket keys %u %h %t %k |
| 62 | 62 | AuthorizedKeysCommandUser root |
| 63 | 63 | PermitTTY no |
| 64 | 64 | DisableForwarding yes |
| 65 | 65 | ``` |
| 66 | 66 | |
| 67 | | -The `keys` command runs as root and opens the database read only and answers sshd with a forced command of `basin shell <user>`. That in turn runs as the login user, checks what `SSH_ORIGINAL_COMMAND` is actually asking for against the database, and then execs straight into `git upload-pack` or `git receive-pack` so nothing is left running afterwards. |
| 67 | +The `keys` command runs as root and opens the database read only and answers sshd with a forced command of `gitpocket shell <user>`. That in turn runs as the login user, checks what `SSH_ORIGINAL_COMMAND` is actually asking for against the database, and then execs straight into `git upload-pack` or `git receive-pack` so nothing is left running afterwards. |
| 68 | 68 | |
| 69 | 69 | ``` |
| 70 | | -sudo -u git basin -root /srv/basin invite |
| 70 | +sudo -u git gitpocket -root /srv/gitpocket invite |
| 71 | 71 | ``` |
| 72 | 72 | |
| 73 | | -If you would rather let anyone sign up then `serve -open` skips the invite step entirely. `basin user <name>` creates an account from the command line with the password read from stdin, and `-ssh-user` changes the account name that appears in clone URLs if you did not call yours `git`. |
| 73 | +If you would rather let anyone sign up then `serve -open` skips the invite step entirely. `gitpocket user <name>` creates an account from the command line with the password read from stdin, and `-ssh-user` changes the account name that appears in clone URLs if you did not call yours `git`. |
| 74 | 74 | |
| 75 | 75 | Mail is configured in `smtp.json` under the root directory and is read once at startup. Plain SMTP takes `host`, `port`, `user`, `password`, `from` and `starttls`, but many VPS providers block every outbound submission port, so `api` and `key` post each message as JSON to a Resend compatible HTTPS endpoint instead. |
| 76 | 76 | |
| 77 | 77 | ``` |
| 78 | | -{"api": "https://api.resend.com/emails", "key": "re_...", "from": "basin <noreply@git.example.org>"} |
| 79 | | -sudo -u git basin -root /srv/basin mail you@example.org |
| 78 | +{"api": "https://api.resend.com/emails", "key": "re_...", "from": "gitpocket <noreply@git.example.org>"} |
| 79 | +sudo -u git gitpocket -root /srv/gitpocket mail you@example.org |
| 80 | 80 | ``` |
| 81 | 81 | |
| 82 | | -`basin feature ~you/a ~you/b` chooses the projects on the logged out front page in that order, `-~you/a` drops one again, and with none chosen the page falls back to the most recently pushed. `basin backup file` writes a consistent copy of the database with `vacuum into`, which is safe to run from a timer while the server is live. |
| 82 | +`gitpocket feature ~you/a ~you/b` chooses the projects on the logged out front page in that order, `-~you/a` drops one again, and with none chosen the page falls back to the most recently pushed. `gitpocket backup file` writes a consistent copy of the database with `vacuum into`, which is safe to run from a timer while the server is live. |
| 83 | 83 | |
| 84 | 84 | ## Use |
| 85 | 85 | |