This repository has no description
21

Configure Feed

Select the types of activity you want to include in your feed.

docs: init

isabel (Jun 14, 2026, 8:15 PM +0100) c7a75953 0b55b986

+63 -1
+63 -1
readme.md
··· 1 - i cba rn 1 + ## Snot 2 + 3 + Snot is a tangled knot that shims public repos that you own on forgejo. 4 + 5 + This is very much a hack. So feel free to use or not to use this. At your own respective risk. 6 + 7 + ### Setup 8 + 9 + #### Config 10 + 11 + At this point basically every option is required to be set. All options also 12 + exist as env vars with the prefix `SNOT`. This may look like `SNOT_WEBHOOK_SECRET`. 13 + 14 + ```toml 15 + hostname = "knot.example.com" 16 + listen_addr = "0.0.0.0:5555" 17 + owner_did = "did:plc:abc123" 18 + db_dsn = "postgres:///forgejo" 19 + repo_root = "/var/lib/forgejo/repositories" 20 + push_remote = "git@git.example.com" 21 + state_dir = "/var/lib/snot" 22 + plc_url = "https://plc.directory" 23 + webhook_secret = "..." 24 + 25 + [users] 26 + "did:plc:abc123" = "isabel" 27 + ``` 28 + 29 + In order to get tangled to receive your push events, you will need to setup a 30 + forgejo system level webhook. 31 + 32 + In Forgejo: Site Administration -> Integrations -> Webhooks -> add a **system webhook** 33 + - Target URL: `https://<knot-host>/hooks/forgejo` 34 + - HTTP method: `POST` 35 + - Post content type: `application/json` 36 + - Secret: the same `webhook_secret`, likely generated via `openssl rand --hex 32` 37 + - Trigger: Push events 38 + 39 + If using postgres like me (which is the only tested option right now) you will 40 + need to setup a `snot` user and give it access to the forgejo data. For me that 41 + looked like the following: 42 + 43 + ```sql 44 + GRANT CONNECT ON DATABASE forgejo TO "snot"; 45 + ALTER DEFAULT PRIVILEGES FOR ROLE forgejo GRANT SELECT ON TABLES TO "snot"; 46 + GRANT SELECT ON ALL TABLES IN SCHEMA public TO "snot"; 47 + ``` 48 + 49 + #### Registering the Knot 50 + 51 + Its same as the tangled knot. 52 + 53 + #### Creating a repo. 54 + 55 + 1. Create a repo on the forgejo frontend however you like and give it a name. 56 + 2. On the tangled frontend create a repo on your snot, with the same name as 57 + the repo you just made. 58 + 3. Thats all! 59 + 60 + #### Pushing 61 + 62 + You push to whatever you have your forgejo setup to push to, I assume there on 63 + the same server anyways.