Skip to content

Commit

Permalink
chore(docs): add example for ENVBUILDER_GIT_SSH_PRIVATE_KEY_BASE64
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstcn committed Jan 6, 2025
1 parent 2c0c991 commit e88e819
Showing 1 changed file with 12 additions and 0 deletions.
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

0 comments on commit e88e819

Please sign in to comment.