-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
# Git config from LDAP (/etc/profile.d/gitconfig.sh)
# Set Git user/email based on LDAP values
test -x /usr/bin/git || return
test -x /usr/bin/ldapsearch || return
git config --global user.name > /dev/null || {
name=$(ldapsearch -x -LLL "(uid=$USER)" cn | sed -ne 's/^cn: //p')
test -n "$name" && git config --global user.name "$name"
}
git config --global user.email > /dev/null || {
email=$(ldapsearch -x -LLL "(uid=$USER)" mail| sed -ne 's/^mail: //p')
test -n "$email" && git config --global user.email "$email"
}Metadata
Metadata
Assignees
Labels
No labels