vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Create accounts with a key and find the instance config
c36d507302c0f7fb24af6eba390c4121d67318c3 · Keenan Nemetz · 16d ago · parent 3abbe749
Create accounts with a key and find the instance config An account is now written with its first key in one transaction, so a name cannot be claimed without a credential. add-key remains for additional keys, and remote user create forwards the key on stdin. Local commands now resolve the config from --config, VOLE_CONFIG, ./vole.toml, or ~/.vole/vole.toml before falling back to defaults. init prints --config in its next steps when the instance will not be discovered automatically.
forge/instance_test.go +13−1
| @@ -1,11 +1,15 @@ | |||
| 1 | 1 | package forge | |
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | "crypto/ed25519" | ||
| 5 | "crypto/rand" | ||
| 4 | 6 | "os" | |
| 5 | 7 | "path/filepath" | |
| 8 | "strings" | ||
| 6 | 9 | "testing" | |
| 7 | 10 | ||
| 8 | 11 | "github.com/rodent-software/vole/forge/config" | |
| 12 | "golang.org/x/crypto/ssh" | ||
| 9 | 13 | ) | |
| 10 | 14 | ||
| 11 | 15 | func TestInitOpenAndRepoLifecycle(t *testing.T) { | |
| @@ -25,7 +29,15 @@ func TestInitOpenAndRepoLifecycle(t *testing.T) { | |||
| 25 | 29 | } | |
| 26 | 30 | defer inst.Close() | |
| 27 | 31 | ||
| 28 | alice, err := inst.Identity.Create("alice", "test") | ||
| 32 | pub, _, err := ed25519.GenerateKey(rand.Reader) | ||
| 33 | if err != nil { | ||
| 34 | t.Fatal(err) | ||
| 35 | } | ||
| 36 | key, err := ssh.NewPublicKey(pub) | ||
| 37 | if err != nil { | ||
| 38 | t.Fatal(err) | ||
| 39 | } | ||
| 40 | alice, err := inst.Identity.Create("alice", strings.TrimSpace(string(ssh.MarshalAuthorizedKey(key))), "test") | ||
| 29 | 41 | if err != nil { | |
| 30 | 42 | t.Fatal(err) | |
| 31 | 43 | } | |