]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/gitcredentials.txt
gitcredentials(7): make shell-snippet example more realistic
[thirdparty/git.git] / Documentation / gitcredentials.txt
index 8127dfcd2fbb5b42ad42c72a12d469059ee0e8d6..0d0f7149bd04ce5ffb900c8b7d01eabc84365fbf 100644 (file)
@@ -233,8 +233,9 @@ Here are some example specifications:
        helper = "/path/to/my/helper --with-arguments"
 
 # or you can specify your own shell snippet
-[credential]
-       helper = "!f() { echo \"password=$(cat $HOME/.secret)\"; }; f"
+[credential "https://example.com"]
+       username = your_user
+       helper = "!f() { test \"$1\" = get && echo \"password=$(cat $HOME/.secret)\"; }; f"
 ----------------------------------------------------
 
 Generally speaking, rule (3) above is the simplest for users to specify.