Skip to content

Instantly share code, notes, and snippets.

@nikitabugrovsky
Created June 8, 2015 18:35
Show Gist options
  • Save nikitabugrovsky/e0bba714e490016237fa to your computer and use it in GitHub Desktop.
Save nikitabugrovsky/e0bba714e490016237fa to your computer and use it in GitHub Desktop.
# check if credential-osxkeychain is installed
git credential-osxkeychain
#if not installed
git credential-osxkeychain
# Test for the cred helper
# git: 'credential-osxkeychain' is not a git command. See 'git --help'.
curl -s -O \
https://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain
# Download the helper
chmod u+x git-credential-osxkeychain
# Fix the permissions on the file so it can be run
# move to the git dir
sudo mv git-credential-osxkeychain \
"$(dirname $(which git))/git-credential-osxkeychain"
# using key-chain from now on
git config --global credential.helper osxkeychain
# Next time when you are using git via https, you will be prompted to username and password. password should be access token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment