Permalink
Browse files

git: install OS X keychain credential helper

Git can cache credentials used when accessing remotes over HTTP; this
helper provides integration with the OS X keychain.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information...
1 parent 513314f commit 697dab5afcecd4aefcb5301953d5488b3718c0d4 @jacknagel jacknagel committed Apr 16, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 Library/Formula/git.rb
View
10 Library/Formula/git.rb
@@ -52,6 +52,13 @@ def install
"LDFLAGS=#{ENV.ldflags}",
"install"
+ # Install the OS X keychain credential helper
+ cd 'contrib/credential/osxkeychain' do
+ system "make", "CC=#{ENV.cc}", "CFLAGS=#{ENV.cflags}"
+ bin.install 'git-credential-osxkeychain'
+ system "make", "clean"
+ end
+
# install the completion script first because it is inside 'contrib'
(prefix+'etc/bash_completion.d').install 'contrib/completion/git-completion.bash'
(share+'git-core').install 'contrib'
@@ -66,6 +73,9 @@ def caveats; <<-EOS.undent
Bash completion has been installed to:
#{etc}/bash_completion.d
+ The OS X keychain credential helper has been installed to:
+ #{HOMEBREW_PREFIX}/bin/git-credential-osxkeychain
+
The 'contrib' directory has been installed to:
#{HOMEBREW_PREFIX}/share/git-core/contrib
EOS

0 comments on commit 697dab5

Please sign in to comment.