vole
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software:2222/vole.git
A free and open-source forge that lives in your Git repo.
Add automatic HTTPS with ACME
642e599466fe4f5066afdc9a24775694a52c9749 · Keenan Nemetz · 15d ago · parent 91e6a33a
forge/repo/repo.go +19
| @@ -121,6 +121,25 @@ func (s *Store) Create(name, owner, description string) (*Meta, error) { | |||
| 121 | 121 | return m, nil | |
| 122 | 122 | } | |
| 123 | 123 | ||
| 124 | // Public reports whether anonymous readers may read the repository. It avoids | ||
| 125 | // git: certificate host policy calls it on a handshake, and a private | ||
| 126 | // repository's name should not end up in a public certificate. | ||
| 127 | func (s *Store) Public(name string) bool { | ||
| 128 | if ValidateName(name) != nil { | ||
| 129 | return false | ||
| 130 | } | ||
| 131 | idb, err := os.ReadFile(filepath.Join(s.path(name), idFile)) | ||
| 132 | if err != nil { | ||
| 133 | return false | ||
| 134 | } | ||
| 135 | id := strings.TrimSpace(string(idb)) | ||
| 136 | if id == "" || s.ACLs == nil { | ||
| 137 | return false | ||
| 138 | } | ||
| 139 | a, err := s.ACLs.Get(id) | ||
| 140 | return err == nil && a != nil && a.Can("", access.Read) | ||
| 141 | } | ||
| 142 | |||
| 124 | 143 | // Open loads a repo by name, returning an error if it is not a Vole repo. | |
| 125 | 144 | func (s *Store) Open(name string) (*Meta, error) { | |
| 126 | 145 | if err := ValidateName(name); err != nil { | |