I can not clone to a specific repository after entering wrong credential at the first time cloning. How can I reset or modify git config to solve the problem.
Asked
Active
Viewed 1,242 times
2 Answers
0
Try using this:
git config credential.helper ""
This should clear the credentials from your local Git folder. The credentials are not safe because they are not encrypted. A better alternative might be to use SSH keys.
-
did not work, It results the same – MohammadHaji May 14 '20 at 20:19
-
Ok, try: git credential-manager clear – bhristov May 14 '20 at 20:23
-
error: remote: HTTP Basic: Access denied and fatal: Authentication failed for 'https...' – MohammadHaji May 14 '20 at 20:43
-
Ok, try this: git remote show origin – bhristov May 14 '20 at 20:43
0
The following steps work for me:
Display the system config file: git config --system -l
There you see one line (at the end) like this:
credential.helper=osxkeychain
(I'm a MacOS user)
To remove this entry write:
git config --system --unset credential.helper
And now, the credentials are forgotten and if you make a new push, you must add your username and password.

SwissCodeMen
- 4,222
- 8
- 24
- 34