Skip to content

Commit d045c1c

Browse files
authored
chore(docs): add example for ENVBUILDER_GIT_SSH_PRIVATE_KEY_BASE64 (#442)
1 parent ebe6ddc commit d045c1c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/git-auth.md

+12
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ envbuilder will assume SSH authentication. You have the following options:
4949
ghcr.io/coder/envbuilder
5050
```
5151

52+
Alternatively, you can set `ENVBUILDER_GIT_SSH_PRIVATE_KEY_BASE64` to the
53+
base64-encoded content of your private key. Example:
54+
55+
```bash
56+
docker run -it --rm \
57+
-v /tmp/envbuilder:/workspaces \
58+
-e [email protected]:path/to/private/repo.git \
59+
-e ENVBUILDER_INIT_SCRIPT=bash \
60+
-e ENVBUILDER_GIT_SSH_PRIVATE_KEY_BASE64=$(base64 < ~/.ssh/id_ed25519) \
61+
ghcr.io/coder/envbuilder
62+
```
63+
5264
1. Agent-based authentication: set `SSH_AUTH_SOCK` and mount in your agent socket, for example:
5365

5466
```bash

0 commit comments

Comments
 (0)