'can i use multiple git accounts in same local system(in Credential Manager)

While I'm trying to fetch branch which is recently created , it shows me remote: Repository not found.

That's because of earlier I have added different account in Credential Manager , which is not belonging to the repo which is recently created

My concern is , is it possible to have multiple git accounts in Credential Manager list ? If anyone knows please answer me, thanks in advance:)



Solution 1:[1]

I am not sure if you can have multiple credentials in the Global Credential But you can use a specific credential for the repository itself:

Two ways to do it:

1- Config the credential of the project, this is not global:

git config credential.${remote}.username yourusername

Then, when you push this user will be used not the global.

2- Forget old saved credentials:

git credential-cache exit

After running this command, if you try to push, it will ask you for username and password.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Zouinkhi