How to delete the git credentials and prompt for password entry every time (Ubuntu environment)

Asked 2 years ago, Updated 2 years ago, 51 views

Environment: Ubuntu Server 20.04
Symptom: When you do git push or git pull from bash, it seems that the login information is stored somewhere and you are not prompted for password authentication.I want to delete my credentials and ask for a password every time, but I don't know what to do.

Tried:

  • Run git config --global --unset credential.helper → No effect
  • Run git credential-cache exit→No effect
  • Delete ~/.git-credentials → File does not exist in the first place

git ubuntu

2022-09-30 19:56

1 Answers

I don't know how the default helper is set in the Ubuntu environment, but according to the Manual, you can reset the setting by setting credential.helper to a string from . What do you think?

(Example of disabling locally only)

$git config --local credential.helper'"


2022-09-30 19:56

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.