Skip to content

Instantly share code, notes, and snippets.

@secemp9
Created June 4, 2024 19:40
Show Gist options
  • Save secemp9/7fc6d92179b7f5c3cb27cdd32fb3c6dd to your computer and use it in GitHub Desktop.
Save secemp9/7fc6d92179b7f5c3cb27cdd32fb3c6dd to your computer and use it in GitHub Desktop.
For making git not use gui password prompt + cache password in memory (mostly for OSX but can be used on Linux too)
git config --global --unset credential.helper osxkeychain
git config --system --unset credential.helper osxkeychain
git config --global --unset credential.helper
git config --system --unset credential.helper
# disable gui prompt
git config --global core.askPass ""
git config --system core.askPass ""
# set up cache
git config --global credential.helper cache
git config --system credential.helper cache
# cache for one hour
git config --global credential.helper 'cache --timeout=3600'
git config --system credential.helper 'cache --timeout=3600'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment