Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Commit f05762a

Browse files
committed
[docs] Add documentation how to use KV V2 Engine
Signed-off-by: Knut Ahlers <knut@ahlers.me>
1 parent 7004d44 commit f05762a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,30 @@ password=myverysecrettoken
3434
protocol=https
3535
```
3636

37+
### Vault KV Secrets Engine - Version 2
38+
39+
This tool supports both versions of the Vault KV Secrets Engine. You just need to consider one thing: Version 2 of the KV Secrets Engine does use slightly modified paths for reading secrets. In order to be compatible to both versions of the Secrets Engine you need to adjust the `vault-path-prefix` slightly when using it:
40+
41+
```bash
42+
# Version 1
43+
vault list secret_v1/git-credentials
44+
# Keys
45+
# ----
46+
# github.com
47+
git config --global credential.helper 'vault --vault-path-prefix secret_v1/git-credentials'
48+
```
49+
50+
```bash
51+
# Version 2
52+
vault kv list secret_v2/git-credentials
53+
# Keys
54+
# ----
55+
# github.com
56+
git config --global credential.helper 'vault --vault-path-prefix secret_v2/data/git-credentials'
57+
```
58+
59+
Mind the extra `/data` after the mountpoint for a mountpoint using version 2. If you omit it the tool will not work properly as it will not yield any credentials.
60+
3761
### Dockerfile example (git clone)
3862

3963
In this example the `VAULT_TOKEN` is passed in through a build-arg which means you **MUST** revoke the token before pushing the image, otherwise you will be leaking an active credential!

0 commit comments

Comments
 (0)