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

Asked 1 years ago, Updated 1 years ago, 46 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.