1

I am using aws code commit which uses git for code. I have created 2 repos say for eg repoA and repoB. Every time when i want to use either of these repos i have to remove one from credential manager then apply my credentials and then perform action. I am trying to globally set both the repos in credential manager but failed to do so. Please help me with this.

1 Answers1

1

You should be able to register two different credentials for a same remote server.
Simply change the remote URL in order to include your username:

cd /path/to/repo
git remote set-url  https://<myUsername1>@<aws-server>/me/myrepo

That way, you would cache a credentials for the URL <myUsername1>@<aws-server> instead of just <aws-server>

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250