Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Commit df40ed0

Browse files
author
Magnus Andersson
committed
Update gitconfig to use osxkeychain for OSX and cache for other systems
1 parent 83c28e3 commit df40ed0

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

git/gitconfig.symlink.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
name = AUTHORNAME
88
email = AUTHOREMAIL
99
[credential]
10-
helper = osxkeychain
10+
helper = GIT_CREDENTIAL_HELPER
1111
[alias]
1212
co = checkout
1313
promote = !$ZSH/bin/git-promote

script/bootstrap

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,18 @@ setup_gitconfig () {
3131
then
3232
info 'setup gitconfig'
3333

34+
git_credential='cache'
35+
if [ "$(uname -s)" == "Darwin" ]
36+
then
37+
git_credential='osxkeychain'
38+
fi
39+
3440
user ' - What is your github author name?'
3541
read -e git_authorname
3642
user ' - What is your github author email?'
3743
read -e git_authoremail
3844

39-
sed -e "s/AUTHORNAME/$git_authorname/g" -e "s/AUTHOREMAIL/$git_authoremail/g" git/gitconfig.symlink.example > git/gitconfig.symlink
45+
sed -e "s/AUTHORNAME/$git_authorname/g" -e "s/AUTHOREMAIL/$git_authoremail/g" -e "s/GIT_CREDENTIAL_HELPER/$git_credential/g" git/gitconfig.symlink.example > git/gitconfig.symlink
4046

4147
success 'gitconfig'
4248
fi

0 commit comments

Comments
 (0)