git-credential-getpass(1) ========================= NAME ---- git-credential-getpass - helper to request credentials from a user SYNOPSIS -------- [verse] git credential-getpass DESCRIPTION ----------- This command requests credentials from the user using git's "default" scheme, including asking via the terminal and respecting the `GIT_ASKPASS` environment variable; see linkgit:gitcredentials[7] for a complete description. The helpers are provided on stdout using git's credential helper protocol. There is no point in using this program as a credential helper by itself; it is exactly equivalent to git's behavior when no helper is configured. However, writers of third-party helpers may want to invoke this program to simulate git's behavior. EXAMPLES -------- Here's a simple, silly example of a helper that stores credentials on disk (similar to linkgit:git-credential-store[1]), and how it could use the `getpass` helper. ------------------------------------------- #!/bin/sh STORAGE=$HOME/.credentials for i in "$@"; do case "$i" in --unique=*) unique=${i#--unique=} ;; esac done if ! test -e "$STORAGE/$unique"; then mkdir -m 0700 "$STORAGE" git credential-getpass "$@" >"$STORAGE/$unique" fi cat "$STORAGE/$unique" ------------------------------------------- GIT --- Part of the linkgit:git[1] suite