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.
Asked
Active
Viewed 28 times
1
-
you can use remote and origin as 2 different repos. NOt really a great thing but your problem will be solved. – Kunal Vohra Apr 14 '20 at 05:39
1 Answers
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