0

I tried to clone a repo and typed in my username and access-token as password. Accidentally, I typed the wrong password in. Now when I try to clone again, the popup asking for my credentials is not showing anymore, instead it instantly says: "Access denied. The provided password or token is incorrect ..."

I tried restarting my computer, but that did not solve the problem.

How I can force to open the window where I can type in my credentials again?

Henning
  • 39
  • 8
  • Run `git config credential.helper` to find out which helper is being used. The helper is a program or a file. You can edit the username and password. – ElpieKay Apr 24 '23 at 09:38
  • @ElpieKay your command has no output in my console. I found on web to try `git config --system --unset credential.helper`. This works, but now I always need to type in my username and password. How can I get back to normal? :/ – Henning Apr 24 '23 at 09:45
  • Take a look at https://stackoverflow.com/questions/35942754/how-can-i-save-username-and-password-in-git. It mentions several helpers like `store`, `cache`. If you use windows, `manager` is also an option. An alternative is to use ssh urls instead of https urls. – ElpieKay Apr 24 '23 at 10:02

1 Answers1

1

Open your terminal and run this command git config --global --edit Locate the credential.helper and change the credential.helper value to cache --timeout=1

[credential]
helper = cache --timeout=1

Save and close the file. Try to perform a Git action that requires authentication, such as pushing or pulling from a remote repository.

If you want to completely disable Git credential caching, you can set the

[credential]
helper = store
iShox
  • 367
  • 2
  • 10