Add documentation
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
5f39869bb9
commit
a546f0f0af
1 changed files with 26 additions and 0 deletions
|
@ -1,6 +1,32 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
###
|
||||||
|
# How to use
|
||||||
|
###
|
||||||
|
#
|
||||||
|
# Create a key in Vault `secret/git-credential/<hostname>` so i.e.
|
||||||
|
# `secret/git-credential/git.luzifer.io` and fill it with key-value
|
||||||
|
# pairs according to the git-credential spec [1]
|
||||||
|
#
|
||||||
|
# So for example this could be the content:
|
||||||
|
# {
|
||||||
|
# "protocol": "https", # Force to use HTTPS
|
||||||
|
# "username": "luzifer", # The username required for the host
|
||||||
|
# "password": "..." # Password for the given user
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# The `${key}=${value}` pairs are dumped as they are without further
|
||||||
|
# processing. Therefore you can override all parameters the
|
||||||
|
# git-credential spec allows you to set. I recommend to enforce the
|
||||||
|
# `protocol` field to `https` as this helper is not checking the
|
||||||
|
# protocol passed but only looks for the `host` value to fetch the
|
||||||
|
# correct key from Vault.
|
||||||
|
#
|
||||||
|
# [1] https://git-scm.com/docs/git-credential
|
||||||
|
#
|
||||||
|
###
|
||||||
|
|
||||||
source "${HOME}/bin/script_framework.sh"
|
source "${HOME}/bin/script_framework.sh"
|
||||||
|
|
||||||
function handle_get() {
|
function handle_get() {
|
||||||
|
|
Loading…
Reference in a new issue