vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Run the exec verbs on a session, not an SSH channel
5ff8dfc964d8e05c5f5b7a8ec5e5f229178e5e4c · Keenan Nemetz · 16d ago · parent 22e290b0
Run the exec verbs on a session, not an SSH channel Every handler behind the exec verb took an *xssh.Channel, and the two that answer the exec request took the request too. That tied twenty functions to the SSH transport, but the front door needs the same verbs, with the same access rules, from a forced command that reaches the service over a local socket. A Session is now what a verb runs on: stdin, stdout, a separate error stream, Accept, CloseWrite, Exit, and Close. sshSession is the only implementation that knows what an SSH channel is, so the handlers no longer name a transport and a second one cannot become a second copy of the access rules. No behaviour change. The handlers keep their names and bodies; the refusal and exit-status paths move behind the interface, which is also what removes the standalone exit helper. A new test drives vole-whoami and git-upload-pack over SSH and over a session with no channel behind it, comparing stdout, stderr, and the exit status of both.
server/ssh/status.go +1−3
| @@ -12,8 +12,6 @@ import ( | |||
| 12 | 12 | "strings" | |
| 13 | 13 | "time" | |
| 14 | 14 | ||
| 15 | xssh "golang.org/x/crypto/ssh" | ||
| 16 | |||
| 17 | 15 | "rodent.software/vole/ci/runs" | |
| 18 | 16 | "rodent.software/vole/forge/access" | |
| 19 | 17 | "rodent.software/vole/forge/landing" | |
| @@ -21,7 +19,7 @@ import ( | |||
| 21 | 19 | "rodent.software/vole/metadata" | |
| 22 | 20 | ) | |
| 23 | 21 | ||
| 24 | func (s *Server) serveChangeStatus(ch xssh.Channel, argv []string, user, remote string) int { | ||
| 22 | func (s *Server) serveChangeStatus(ch Session, argv []string, user, remote string) int { | ||
| 25 | 23 | if len(argv) != 3 { | |
| 26 | 24 | fmt.Fprint(ch, "vole: usage: vole-change-status <repository> <request-id>\n") | |
| 27 | 25 | return 129 | |