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

318 views Asked by At

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:)

1

There are 1 answers

0
mzouink On

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.