Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): add example for ENVBUILDER_GIT_SSH_PRIVATE_KEY_BASE64 #442

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/git-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ envbuilder will assume SSH authentication. You have the following options:
ghcr.io/coder/envbuilder
```

Alternatively, you can set `ENVBUILDER_GIT_SSH_PRIVATE_KEY_BASE64` to the
base64-encoded content of your private key. Example:

```bash
docker run -it --rm \
-v /tmp/envbuilder:/workspaces \
-e [email protected]:path/to/private/repo.git \
-e ENVBUILDER_INIT_SCRIPT=bash \
-e ENVBUILDER_GIT_SSH_PRIVATE_KEY_BASE64=$(base64 < ~/.ssh/id_ed25519) \
ghcr.io/coder/envbuilder
```

1. Agent-based authentication: set `SSH_AUTH_SOCK` and mount in your agent socket, for example:

```bash
Expand Down
Loading