0

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.

2 Answers2

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.

halfer
  • 19,824
  • 17
  • 99
  • 186
bhristov
  • 3,137
  • 2
  • 10
  • 26
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