You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build-caches.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,11 +46,21 @@ buildcache:
46
46
| Field | Required | Description |
47
47
|-------|----------|-------------|
48
48
| `url` | yes | location of the cache (a `file://` path, or an `http(s)://`, `s3://` or `oci://` URL) |
49
-
| `private_key` | yes | PGP key used to sign and push packages (see [Keys](#keys)) |
49
+
| `private_key` | no | PGP key used to sign and push packages (see [Keys](#keys)); omit for a read-only cache |
50
50
| `public_key` | no | PGP key used to verify downloaded packages |
51
51
| `name` | no | name Spack registers the mirror under (default `buildcache`) |
52
52
| `mount_specific` | no | store the cache in a per-mount-point sub-directory (default `false`) |
53
53
54
+
### Read-only build cache
55
+
56
+
Omit `private_key` to configure a read-only cache: Spack fetches packages from it but never signs or pushes anything back.
57
+
This is useful for consuming a shared team cache that you are not permitted to write to.
58
+
59
+
```yaml title="mirrors.yaml"
60
+
buildcache:
61
+
url: file:///capstor/scratch/team/uenv-cache
62
+
```
63
+
54
64
### `mount_specific`
55
65
56
66
Spack binaries embed the install prefix (the image's mount point), so binaries built for `/user-environment` cannot be reused at a different mount point.
0 commit comments