README.md

  1# Soft Serve
  2
  3<p>
  4    <img style="width: 451px" src="https://stuff.charm.sh/soft-serve/soft-serve-header.png?0" alt="A nice rendering of some melting ice cream with the words ā€˜Charm Soft Serve’ next to it"><br>
  5    <a href="https://github.com/charmbracelet/soft-serve/releases"><img src="https://img.shields.io/github/release/charmbracelet/soft-serve.svg" alt="Latest Release"></a>
  6    <a href="https://pkg.go.dev/github.com/charmbracelet/soft-serve?tab=doc"><img src="https://godoc.org/github.com/golang/gddo?status.svg" alt="GoDoc"></a>
  7    <a href="https://github.com/charmbracelet/soft-serve/actions"><img src="https://github.com/charmbracelet/soft-serve/workflows/build/badge.svg" alt="Build Status"></a>
  8    <a href="https://nightly.link/charmbracelet/soft-serve/workflows/nightly/main"><img src="https://shields.io/badge/-Nightly%20Builds-orange?logo=hackthebox&logoColor=fff&style=appveyor"/></a>
  9</p>
 10
 11A tasty, self-hostable Git server for the command line. šŸ¦
 12
 13<picture>
 14  <source media="(max-width: 750px)" srcset="https://github.com/charmbracelet/soft-serve/assets/42545625/c754c746-dc4c-44a6-9c39-28649264cbf2">
 15  <source media="(min-width: 750px)" width="750" srcset="https://github.com/charmbracelet/soft-serve/assets/42545625/c754c746-dc4c-44a6-9c39-28649264cbf2">
 16  <img src="https://github.com/charmbracelet/soft-serve/assets/42545625/c754c746-dc4c-44a6-9c39-28649264cbf2" alt="Soft Serve screencast">
 17</picture>
 18
 19- Easy to navigate TUI available over SSH
 20- Clone repos over SSH, HTTP, or Git protocol
 21- Git LFS support with both HTTP and SSH backends
 22- Manage repos with SSH
 23- Create repos on demand with SSH or `git push`
 24- Browse repos, files and commits with SSH-accessible UI
 25- Print files over SSH with or without syntax highlighting and line numbers
 26- Easy access control
 27  - SSH authentication using public keys
 28  - Allow/disallow anonymous access
 29  - Add collaborators with SSH public keys
 30  - Repos can be public or private
 31  - User access tokens
 32
 33## Where can I see it?
 34
 35Just run `ssh git.charm.sh` for an example. You can also try some of the following commands:
 36
 37```bash
 38# Jump directly to a repo in the TUI
 39ssh git.charm.sh -t soft-serve
 40
 41# Print out a directory tree for a repo
 42ssh git.charm.sh repo tree soft-serve
 43
 44# Print a specific file
 45ssh git.charm.sh repo blob soft-serve cmd/soft/main.go
 46
 47# Print a file with syntax highlighting and line numbers
 48ssh git.charm.sh repo blob soft-serve cmd/soft/main.go -c -l
 49```
 50
 51Or you can use Soft Serve to browse local repositories using `soft browse
 52[directory]` or running `soft` within a Git repository.
 53
 54## Installation
 55
 56Soft Serve is a single binary called `soft`. You can get it from a package
 57manager:
 58
 59```bash
 60# macOS or Linux
 61brew install charmbracelet/tap/soft-serve
 62
 63# Windows (with Winget)
 64winget install charmbracelet.soft-serve
 65
 66# Arch Linux
 67pacman -S soft-serve
 68
 69# Nix
 70nix-env -iA nixpkgs.soft-serve
 71
 72# Debian/Ubuntu
 73sudo mkdir -p /etc/apt/keyrings
 74curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
 75echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
 76sudo apt update && sudo apt install soft-serve
 77
 78# Fedora/RHEL
 79echo '[charm]
 80name=Charm
 81baseurl=https://repo.charm.sh/yum/
 82enabled=1
 83gpgcheck=1
 84gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo
 85sudo yum install soft-serve
 86```
 87
 88You can also download a binary from the [releases][releases] page. Packages are
 89available in Alpine, Debian, and RPM formats. Binaries are available for Linux,
 90macOS, and Windows.
 91
 92[releases]: https://github.com/charmbracelet/soft-serve/releases
 93
 94Or just install it with `go`:
 95
 96```bash
 97go install github.com/charmbracelet/soft-serve/cmd/soft@latest
 98```
 99
100A [Docker image][docker] is also available.
101
102[docker]: https://github.com/charmbracelet/soft-serve/blob/main/docker.md
103
104## Setting up a server
105
106Make sure `git` is installed, then run `soft serve`. That’s it.
107
108This will create a `data` directory that will store all the repos, ssh keys,
109and database.
110
111To change the default data path use `SOFT_SERVE_DATA_PATH` environment variable.
112
113```sh
114SOFT_SERVE_DATA_PATH=/var/lib/soft-serve soft serve
115```
116
117When you run Soft Serve for the first time, make sure you have the
118`SOFT_SERVE_INITIAL_ADMIN_KEYS` environment variable is set to your ssh
119authorized key. Any added key to this variable will be treated as admin with
120full privileges.
121
122Using this environment variable, Soft Serve will create a new `admin` user that
123has full privileges. You can rename and change the user settings later.
124
125Check out [Systemd][systemd] on how to run Soft Serve as a service using
126Systemd. Soft Serve packages in our Apt/Yum repositories come with Systemd
127service units.
128
129[systemd]: https://github.com/charmbracelet/soft-serve/blob/main/systemd.md
130
131### Server Configuration
132
133Once you start the server for the first time, the settings will be in
134`config.yaml` under your data directory. The default `config.yaml` is
135self-explanatory and will look like this:
136
137```yaml
138# Soft Serve Server configurations
139
140# The name of the server.
141# This is the name that will be displayed in the UI.
142name: "Soft Serve"
143
144# Log format to use. Valid values are "json", "logfmt", and "text".
145log_format: "text"
146
147# The SSH server configuration.
148ssh:
149  # The address on which the SSH server will listen.
150  listen_addr: ":23231"
151
152  # The public URL of the SSH server.
153  # This is the address that will be used to clone repositories.
154  public_url: "ssh://localhost:23231"
155
156  # The path to the SSH server's private key.
157  key_path: "ssh/soft_serve_host"
158
159  # The path to the SSH server's client private key.
160  # This key will be used to authenticate the server to make git requests to
161  # ssh remotes.
162  client_key_path: "ssh/soft_serve_client"
163
164  # The maximum number of seconds a connection can take.
165  # A value of 0 means no timeout.
166  max_timeout: 0
167
168  # The number of seconds a connection can be idle before it is closed.
169  idle_timeout: 120
170
171# The Git daemon configuration.
172git:
173  # The address on which the Git daemon will listen.
174  listen_addr: ":9418"
175
176  # The maximum number of seconds a connection can take.
177  # A value of 0 means no timeout.
178  max_timeout: 0
179
180  # The number of seconds a connection can be idle before it is closed.
181  idle_timeout: 3
182
183  # The maximum number of concurrent connections.
184  max_connections: 32
185
186# The HTTP server configuration.
187http:
188  # The address on which the HTTP server will listen.
189  listen_addr: ":23232"
190
191  # The path to the TLS private key.
192  tls_key_path: ""
193
194  # The path to the TLS certificate.
195  tls_cert_path: ""
196
197  # The public URL of the HTTP server.
198  # This is the address that will be used to clone repositories.
199  # Make sure to use https:// if you are using TLS.
200  public_url: "http://localhost:23232"
201
202# The database configuration.
203db:
204  # The database driver to use.
205  # Valid values are "sqlite" and "postgres".
206  driver: "sqlite"
207  # The database data source name.
208  # This is driver specific and can be a file path or connection string.
209  # Make sure foreign key support is enabled when using SQLite.
210  data_source: "soft-serve.db?_pragma=busy_timeout(5000)&_pragma=foreign_keys(1)"
211
212# Git LFS configuration.
213lfs:
214  # Enable Git LFS.
215  enabled: true
216  # Enable Git SSH transfer.
217  ssh_enabled: false
218
219# Cron job configuration
220jobs:
221  mirror_pull: "@every 10m"
222
223# The stats server configuration.
224stats:
225  # The address on which the stats server will listen.
226  listen_addr: ":23233"
227# Additional admin keys.
228#initial_admin_keys:
229#  - "ssh-rsa AAAAB3NzaC1yc2..."
230```
231
232You can also use environment variables, to override these settings. All server
233settings environment variables start with `SOFT_SERVE_` followed by the setting
234name all in uppercase. Here are some examples:
235
236- `SOFT_SERVE_NAME`: The name of the server that will appear in the TUI
237- `SOFT_SERVE_SSH_LISTEN_ADDR`: SSH listen address
238- `SOFT_SERVE_SSH_KEY_PATH`: SSH host key-pair path
239- `SOFT_SERVE_HTTP_LISTEN_ADDR`: HTTP listen address
240- `SOFT_SERVE_HTTP_PUBLIC_URL`: HTTP public URL used for cloning
241- `SOFT_SERVE_GIT_MAX_CONNECTIONS`: The number of simultaneous connections to git daemon
242
243#### Database Configuration
244
245Soft Serve supports both SQLite and Postgres for its database. Like all other Soft Serve settings, you can change the database _driver_ and _data source_ using either `config.yaml` or environment variables. The default config uses SQLite as the default database driver.
246
247To use Postgres as your database, first create a Soft Serve database:
248
249```sh
250psql -h<hostname> -p<port> -U<user> -c 'CREATE DATABASE soft_serve'
251```
252
253Then set the database _data source_ to point to your Postgres database. For instance, if you're running Postgres locally, using the default user `postgres` and using a database name `soft_serve`, you would have this config in your config file or environment variable:
254
255```
256db:
257  driver: "postgres"
258  data_source: "postgres://postgres@localhost:5432/soft_serve?sslmode=disable"
259```
260
261Environment variables equivalent:
262
263```sh
264SOFT_SERVE_DB_DRIVER=postgres \
265SOFT_SERVE_DB_DATA_SOURCE="postgres://postgres@localhost:5432/soft_serve?sslmode=disable" \
266soft serve
267```
268
269You can specify a database connection password in the _data source_ url. For example, `postgres://myuser:dbpass@localhost:5432/my_soft_serve_db`.
270
271#### LFS Configuration
272
273Soft Serve supports both Git LFS [HTTP](https://github.com/git-lfs/git-lfs/blob/main/docs/api/README.md) and [SSH](https://github.com/git-lfs/git-lfs/blob/main/docs/proposals/ssh_adapter.md) protocols out of the box, there is no need to do any extra set up.
274
275Use the `lfs` config section to customize your Git LFS server.
276
277> **Note**: The pure-SSH transfer is disabled by default.
278
279## Server Access
280
281Soft Serve at its core manages your server authentication and authorization. Authentication verifies the identity of a user, while authorization determines their access rights to a repository.
282
283To manage the server users, access, and repos, you can use the SSH command line interface.
284
285Try `ssh localhost -i ~/.ssh/id_ed25519 -p 23231 help` for more info. Make sure
286you use your key here.
287
288For ease of use, instead of specifying the key, port, and hostname every time
289you SSH into Soft Serve, add your own Soft Serve instance entry to your SSH
290config. For instance, to use `ssh soft` instead of typing `ssh localhost -i
291~/.ssh/id_ed25519 -p 23231`, we can define a `soft` entry in our SSH config
292file `~/.ssh/config`.
293
294```conf
295Host soft
296  HostName localhost
297  Port 23231
298  IdentityFile ~/.ssh/id_ed25519
299```
300
301Now, we can do `ssh soft` to SSH into Soft Serve. Since `git` is also aware of
302this config, you can use `soft` as the hostname for your clone commands.
303
304```sh
305git clone ssh://soft/dotfiles
306# make changes
307# add & commit
308git push origin main
309```
310
311> **Note** The `-i` part will be omitted in the examples below for brevity. You
312> can add your server settings to your sshconfig for quicker access.
313
314### Authentication
315
316Everything that needs authentication is done using SSH. Make sure you have
317added an entry for your Soft Serve instance in your `~/.ssh/config` file.
318
319By default, Soft Serve gives ready-only permission to anonymous connections to
320any of the above protocols. This is controlled by two settings `anon-access`
321and `allow-keyless`.
322
323- `anon-access`: Defines the access level for anonymous users. Available
324  options are `no-access`, `read-only`, `read-write`, and `admin-access`.
325  Default is `read-only`.
326- `allow-keyless`: Whether to allow connections that doesn't use keys to pass.
327  Setting this to `false` would disable access to SSH keyboard-interactive,
328  HTTP, and Git protocol connections. Default is `true`.
329
330```sh
331$ ssh -p 23231 localhost settings
332Manage server settings
333
334Usage:
335  ssh -p 23231 localhost settings [command]
336
337Available Commands:
338  allow-keyless Set or get allow keyless access to repositories
339  anon-access   Set or get the default access level for anonymous users
340
341Flags:
342  -h, --help   help for settings
343
344Use "ssh -p 23231 localhost settings [command] --help" for more information about a command.
345```
346
347> **Note** These settings can only be changed by admins.
348
349When `allow-keyless` is disabled, connections that don't use SSH Public Key
350authentication will get denied. This means cloning repos over HTTP(s) or git://
351will get denied.
352
353Meanwhile, `anon-access` controls the access level granted to connections that
354use SSH Public Key authentication but are not registered users. The default
355setting for this is `read-only`. This will grant anonymous connections that use
356SSH Public Key authentication `read-only` access to public repos.
357
358`anon-access` is also used in combination with `allow-keyless` to determine the
359access level for HTTP(s) and git:// clone requests.
360
361#### SSH
362
363Soft Serve doesn't allow duplicate SSH public keys for users. A public key can be associated with one user only. This makes SSH authentication simple and straight forward, add your public key to your Soft Serve user to be able to access Soft Serve.
364
365#### HTTP
366
367You can generate user access tokens through the SSH command line interface. Access tokens can have an optional expiration date. Use your access token as the basic auth user to access your Soft Serve repos through HTTP.
368
369```sh
370# Create a user token
371ssh -p 23231 localhost token create 'my new token'
372ss_1234abc56789012345678901234de246d798fghi
373
374# Or with an expiry date
375ssh -p 23231 localhost token create --expires-in 1y 'my other token'
376ss_98fghi1234abc56789012345678901234de246d7
377```
378
379Now you can access to repos that require `read-write` access.
380
381```sh
382git clone http://ss_98fghi1234abc56789012345678901234de246d7@localhost:23232/my-private-repo.git my-private-repo
383# Make changes and push
384```
385
386### Authorization
387
388Soft Serve offers a simple access control. There are four access levels,
389no-access, read-only, read-write, and admin-access.
390
391`admin-access` has full control of the server and can make changes to users and repos.
392
393`read-write` access gets full control of repos.
394
395`read-only` can read public repos.
396
397`no-access` denies access to all repos.
398
399## User Management
400
401Admins can manage users and their keys using the `user` command. Once a user is
402created and has access to the server, they can manage their own keys and
403settings.
404
405To create a new user simply use `user create`:
406
407```sh
408# Create a new user
409ssh -p 23231 localhost user create beatrice
410
411# Add user keys
412ssh -p 23231 localhost user add-pubkey beatrice ssh-rsa AAAAB3Nz...
413ssh -p 23231 localhost user add-pubkey beatrice ssh-ed25519 AAAA...
414
415# Create another user with public key
416ssh -p 23231 localhost user create frankie '-k "ssh-ed25519 AAAATzN..."'
417
418# Need help?
419ssh -p 23231 localhost user help
420```
421
422Once a user is created, they get `read-only` access to public repositories.
423They can also create new repositories on the server.
424
425Users can manage their keys using the `pubkey` command:
426
427```sh
428# List user keys
429ssh -p 23231 localhost pubkey list
430
431# Add key
432ssh -p 23231 localhost pubkey add ssh-ed25519 AAAA...
433
434# Wanna change your username?
435ssh -p 23231 localhost set-username yolo
436
437# To display user info
438ssh -p 23231 localhost info
439```
440
441## Repositories
442
443You can manage repositories using the `repo` command.
444
445```sh
446# Run repo help
447$ ssh -p 23231 localhost repo help
448Manage repositories
449
450Usage:
451  ssh -p 23231 localhost repo [command]
452
453Aliases:
454  repo, repos, repository, repositories
455
456Available Commands:
457  blob         Print out the contents of file at path
458  branch       Manage repository branches
459  collab       Manage collaborators
460  create       Create a new repository
461  delete       Delete a repository
462  description  Set or get the description for a repository
463  hide         Hide or unhide a repository
464  import       Import a new repository from remote
465  info         Get information about a repository
466  is-mirror    Whether a repository is a mirror
467  list         List repositories
468  private      Set or get a repository private property
469  project-name Set or get the project name for a repository
470  rename       Rename an existing repository
471  tag          Manage repository tags
472  tree         Print repository tree at path
473
474Flags:
475  -h, --help   help for repo
476
477Use "ssh -p 23231 localhost repo [command] --help" for more information about a command.
478```
479
480To use any of the above `repo` commands, a user must be a collaborator in the repository. More on this below.
481
482### Creating Repositories
483
484To create a repository, first make sure you are a registered user. Use the
485`repo create <repo>` command to create a new repository:
486
487```sh
488# Create a new repository
489ssh -p 23231 localhost repo create icecream
490
491# Create a repo with description
492ssh -p 23231 localhost repo create icecream '-d "This is an Ice Cream description"'
493
494# ... and project name
495ssh -p 23231 localhost repo create icecream '-d "This is an Ice Cream description"' '-n "Ice Cream"'
496
497# I need my repository private!
498ssh -p 23231 localhost repo create icecream -p '-d "This is an Ice Cream description"' '-n "Ice Cream"'
499
500# Help?
501ssh -p 23231 localhost repo create -h
502```
503
504Or you can add your Soft Serve server as a remote to any existing repo, given
505you have write access, and push to remote:
506
507```
508git remote add origin ssh://localhost:23231/icecream
509```
510
511After you’ve added the remote just go ahead and push. If the repo doesn’t exist
512on the server it’ll be created.
513
514```
515git push origin main
516```
517
518### Nested Repositories
519
520Repositories can be nested too:
521
522```sh
523# Create a new nested repository
524ssh -p 23231 localhost repo create charmbracelet/icecream
525
526# Or ...
527git remote add charm ssh://localhost:23231/charmbracelet/icecream
528git push charm main
529```
530
531### Mirrors
532
533You can also *import* repositories from any public remote. Use the `repo import` command.
534
535```sh
536ssh -p 23231 localhost repo import soft-serve https://github.com/charmbracelet/soft-serve
537```
538
539Use `--mirror` or `-m` to mark the repository as a *pull* mirror.
540
541### Deleting Repositories
542
543You can delete repositories using the `repo delete <repo>` command.
544
545```sh
546ssh -p 23231 localhost repo delete icecream
547```
548
549### Renaming Repositories
550
551Use the `repo rename <old> <new>` command to rename existing repositories.
552
553```sh
554ssh -p 23231 localhost repo rename icecream vanilla
555```
556
557### Repository Collaborators
558
559Sometimes you want to restrict write access to certain repositories. This can
560be achieved by adding a collaborator to your repository.
561
562Use the `repo collab <command> <repo>` command to manage repo collaborators.
563
564```sh
565# Add collaborator to soft-serve
566ssh -p 23231 localhost repo collab add soft-serve frankie
567
568# Add collaborator with a specific access level
569ssh -p 23231 localhost repo collab add soft-serve beatrice read-only
570
571# Remove collaborator
572ssh -p 23231 localhost repo collab remove soft-serve beatrice
573
574# List collaborators
575ssh -p 23231 localhost repo collab list soft-serve
576```
577
578### Repository Metadata
579
580You can also change the repo's description, project name, whether it's private,
581etc using the `repo <command>` command.
582
583```sh
584# Set description for repo
585ssh -p 23231 localhost repo description icecream "This is a new description"
586
587# Hide repo from listing
588ssh -p 23231 localhost repo hidden icecream true
589
590# List repository info (branches, tags, description, etc)
591ssh -p 23231 localhost repo icecream info
592```
593
594To make a repository private, use `repo private <repo> [true|false]`. Private
595repos can only be accessed by admins and collaborators.
596
597```sh
598ssh -p 23231 localhost repo private icecream true
599```
600
601### Repository Branches & Tags
602
603Use `repo branch` and `repo tag` to list, and delete branches or tags. You can
604also use `repo branch default` to set or get the repository default branch.
605
606### Repository Tree
607
608To print a file tree for the project, just use the `repo tree` command along with
609the repo name as the SSH command to your Soft Serve server:
610
611```sh
612ssh -p 23231 localhost repo tree soft-serve
613```
614
615You can also specify the sub-path and a specific reference or branch.
616
617```sh
618ssh -p 23231 localhost repo tree soft-serve server/config
619ssh -p 23231 localhost repo tree soft-serve main server/config
620```
621
622From there, you can print individual files using the `repo blob` command:
623
624```sh
625ssh -p 23231 localhost repo blob soft-serve cmd/soft/main.go
626```
627
628You can add the `-c` flag to enable syntax coloring and `-l` to print line
629numbers:
630
631```sh
632ssh -p 23231 localhost repo blob soft-serve cmd/soft/main.go -c -l
633
634```
635
636Use `--raw` to print raw file contents. This is useful for dumping binary data.
637
638### Repository webhooks
639
640Soft Serve supports repository webhooks using the `repo webhook` command. You
641can create and manage webhooks for different repository events such as _push_,
642_collaborators_, and _branch_tag_create_ events.
643
644```
645Manage repository webhooks
646
647Usage:
648  ssh -p 23231 localhost repo webhook [command]
649
650Aliases:
651  webhook, webhooks
652
653Available Commands:
654  create      Create a repository webhook
655  delete      Delete a repository webhook
656  deliveries  Manage webhook deliveries
657  list        List repository webhooks
658  update      Update a repository webhook
659
660Flags:
661  -h, --help   help for webhook
662```
663
664## The Soft Serve TUI
665
666<img src="https://stuff.charm.sh/soft-serve/soft-serve-demo-commit.png" width="750" alt="TUI example showing a diff">
667
668Soft Serve TUI is mainly used to browse repos over SSH. You can also use it to
669browse local repositories with `soft browse` or running `soft` within a Git
670repository.
671
672```sh
673ssh localhost -p 23231
674```
675
676It's also possible to ā€œlinkā€ to a specific repo:
677
678```sh
679ssh -p 23231 localhost -t soft-serve
680```
681
682You can copy text to your clipboard over SSH. For instance, you can press
683<kbd>c</kbd> on the highlighted repo in the menu to copy the clone command
684[^osc52].
685
686[^osc52]:
687    Copying over SSH depends on your terminal support of OSC52. Refer to
688    [go-osc52](https://github.com/aymanbagabas/go-osc52) for more information.
689
690## Hooks
691
692Soft Serve supports git server-side hooks `pre-receive`, `update`,
693`post-update`, and `post-receive`. This means you can define your own hooks to
694run on repository push events. Hooks can be defined as a per-repository hook,
695and/or global hooks that run for all repositories.
696
697You can find per-repository hooks under the repository `hooks` directory.
698
699Globs hooks can be found in your `SOFT_SERVE_DATA_PATH` directory under
700`hooks`. Defining global hooks is useful if you want to run CI/CD for example.
701
702Here's an example of sending a message after receiving a push event. Create an
703executable file `<data path>/hooks/update`:
704
705```sh
706#!/bin/sh
707#
708# An example hook script to echo information about the push
709# and send it to the client.
710
711refname="$1"
712oldrev="$2"
713newrev="$3"
714
715# Safety check
716if [ -z "$GIT_DIR" ]; then
717        echo "Don't run this script from the command line." >&2
718        echo " (if you want, you could supply GIT_DIR then run" >&2
719        echo "  $0 <ref> <oldrev> <newrev>)" >&2
720        exit 1
721fi
722
723if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
724        echo "usage: $0 <ref> <oldrev> <newrev>" >&2
725        exit 1
726fi
727
728# Check types
729# if $newrev is 0000...0000, it's a commit to delete a ref.
730zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0')
731if [ "$newrev" = "$zero" ]; then
732        newrev_type=delete
733else
734        newrev_type=$(git cat-file -t $newrev)
735fi
736
737echo "Hi from Soft Serve update hook!"
738echo
739echo "RefName: $refname"
740echo "Change Type: $newrev_type"
741echo "Old SHA1: $oldrev"
742echo "New SHA1: $newrev"
743
744exit 0
745```
746
747Now, you should get a message after pushing changes to any repository.
748
749## A note about RSA keys
750
751Unfortunately, due to a shortcoming in Go’s `x/crypto/ssh` package, Soft Serve
752does not currently support access via new SSH RSA keys: only the old SHA-1
753ones will work.
754
755Until we sort this out you’ll either need an SHA-1 RSA key or a key with
756another algorithm, e.g. Ed25519. Not sure what type of keys you have?
757You can check with the following:
758
759```sh
760$ find ~/.ssh/id_*.pub -exec ssh-keygen -l -f {} \;
761```
762
763If you’re curious about the inner workings of this problem have a look at:
764
765- https://github.com/golang/go/issues/37278
766- https://go-review.googlesource.com/c/crypto/+/220037
767- https://github.com/golang/crypto/pull/197
768
769## Feedback
770
771We’d love to hear your thoughts on this project. Feel free to drop us a note!
772
773- [Twitter](https://twitter.com/charmcli)
774- [The Fediverse](https://mastodon.social/@charmcli)
775- [Discord](https://charm.sh/chat)
776
777## License
778
779[MIT](https://github.com/charmbracelet/soft-serve/raw/main/LICENSE)
780
781---
782
783Part of [Charm](https://charm.sh).
784
785<a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a>
786
787Charmēƒ­ēˆ±å¼€ęŗ • Charm loves open source