Skip to content

Commit e88e819

Browse files
committed
chore(docs): add example for ENVBUILDER_GIT_SSH_PRIVATE_KEY_BASE64
1 parent 2c0c991 commit e88e819

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/git-auth.md

Lines changed: 12 additions & 0 deletions
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 ENVBUILDER_GIT_URL=git@example.com: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)