Kaigo
Kaigo

Reputation: 1599

How do I stop keychain storing git credentials, permanently and globally?

Every time I authenticate to github on a shared computer I need to delete my creds from keychain.

Is there a way to permanently turning this off for all repos?

Upvotes: 3

Views: 554

Answers (1)

VonC
VonC

Reputation: 1324935

Make sure the credential helper is declared "globally", meaning at your account level.

But if, by shared, you mean "using the same account", then yes, you can

  • deactivate the credential helper (generally not set at the system level, only global, so git config --global --unset-all credential.helper
  • use SSH, with a key per actual user (and setting GIT_SSH_COMMAND to ~/.ssh/my_actual_private_key)

That way, even if you are using only one account on the shared computer, you can still reference a credential which references you, and only you.

Upvotes: 0

Related Questions