summary refs log tree commit diff
path: root/home/.local/bin/git-password
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-05-04 15:39:58 -0400
committerJune McEnroe <june@causal.agency>2020-05-04 15:39:58 -0400
commitc2cbf537ce7ee7ff5d7dd7acc586b2467c7ee32e (patch)
treefc8775108e1e5909b9832dd2f817f9193bf30c30 /home/.local/bin/git-password
parentAdd The Rosewater Insurrection (diff)
downloadsrc-c2cbf537ce7ee7ff5d7dd7acc586b2467c7ee32e.tar.gz
src-c2cbf537ce7ee7ff5d7dd7acc586b2467c7ee32e.zip
Add git-password script to get a password from git-credential
Diffstat (limited to '')
-rwxr-xr-xhome/.local/bin/git-password7
1 files changed, 7 insertions, 0 deletions
diff --git a/home/.local/bin/git-password b/home/.local/bin/git-password
new file mode 100755
index 00000000..41351e38
--- /dev/null
+++ b/home/.local/bin/git-password
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -eu
+
+url=$1
+echo "url=${url}" \
+	| git credential fill \
+	| sed -En 's/^password=(.*)/\1/p'