summaryrefslogtreecommitdiff
path: root/contrib/credential/osxkeychain/Makefile
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2011-12-10 05:53:14 -0500
committerJunio C Hamano <gitster@pobox.com>2011-12-12 16:09:39 -0800
commit34961d30dae69b00a8a5aabd568fb87f376ebb87 (patch)
tree71cc073d5a0fd830b5bc3e8326bdd39987f405b6 /contrib/credential/osxkeychain/Makefile
parent3f3a9701aeb1743a3eaedec8791afba67419961c (diff)
downloadgit-34961d30dae69b00a8a5aabd568fb87f376ebb87.tar.gz
contrib: add credential helper for OS X Keychainjk/git-prompt
With this installed in your $PATH, you can store git-over-http passwords in your keychain by doing: git config credential.helper osxkeychain The code is based in large part on the work of Jay Soffian, who wrote the helper originally for the initial, unpublished version of the credential helper protocol. This version will pass t0303 if you do: GIT_TEST_CREDENTIAL_HELPER=osxkeychain \ GIT_TEST_CREDENTIAL_HELPER_SETUP="export HOME=$HOME" \ ./t0303-credential-external.sh The "HOME" setup is unfortunately necessary. The test scripts set HOME to the trash directory, but this causes the keychain API to complain. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/credential/osxkeychain/Makefile')
-rw-r--r--contrib/credential/osxkeychain/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/credential/osxkeychain/Makefile b/contrib/credential/osxkeychain/Makefile
new file mode 100644
index 0000000000..75c07f8be4
--- /dev/null
+++ b/contrib/credential/osxkeychain/Makefile
@@ -0,0 +1,14 @@
+all:: git-credential-osxkeychain
+
+CC = gcc
+RM = rm -f
+CFLAGS = -g -Wall
+
+git-credential-osxkeychain: git-credential-osxkeychain.o
+ $(CC) -o $@ $< -Wl,-framework -Wl,Security
+
+git-credential-osxkeychain.o: git-credential-osxkeychain.c
+ $(CC) -c $(CFLAGS) $<
+
+clean:
+ $(RM) git-credential-osxkeychain git-credential-osxkeychain.o