Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
set -e
GIT_CONFIG=$(git config --show-origin --get credential.helper)
if [[ ${GIT_CONFIG} == **osxkeychain** ]]; then
FILE=$(echo ${GIT_CONFIG} | awk '{print $1}' | sed s/'file:'//)
sudo sed -i.bak '/\[credential\]$/N; /\[credential\]/d' $(echo ${FILE})
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.