2

I have my own private repo in Github. I used GitBash to clone it to my local computer and accidentally entered a wrong password. Then I tried again and what I had was

fatal: could not create work tree dir 'sample': Permission denied

I tried this command

git config --global --unset credential.helper

as described here Remove credentials from Git but it didn't help.

I tried this command

git credential-manager delete https://github.com

as described here Git doesn't allow me to enter my password for cloning since I got it wrong the first time but it says "Unknown command 'delete'. Please use git-credential-manager ? to display help."

I don't know how to make it forget what I entered, or enter credentials again.

Christian
  • 4,902
  • 4
  • 24
  • 42
mimic
  • 4,897
  • 7
  • 54
  • 93
  • Have you seen this? https://stackoverflow.com/questions/15381198/remove-credentials-from-git – Christian Sep 20 '19 at 22:17
  • Yes, I saw, and it's the first link in my post. – mimic Sep 20 '19 at 22:22
  • Oh, shame on me. Haven't clicked it :/ Recognized that the information in there are pretty outdated. Back to your issue - I assume you are on windows reading GitBash, am I right? Another stupid question maybe, but if delete failed, have you tried *remove* like `git credential-manager remove https://github.com`? And, have you checked the credential manager in the windows control panel? – Christian Sep 20 '19 at 23:09
  • 1
    @Christian, no I didn't try. Let me try the next time when it happens again. I solved this problem just waiting for 5 minutes or so. – mimic Sep 21 '19 at 02:27

1 Answers1

0

but it says "Unknown command 'delete'.

As I mention here, the proper command now is reject:

git credential-manager reject https://github.com
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250