0 votes
1 view
in Devops and Agile by (19.8k points)

I opened a new GitHub account to separate my biz vs. personal repository.

Now, I git init my local repo and git add remote origin <the repo https url>

I try to push and it seems to always take the credentials of my original account, not prompting me for the credentials for the new account.

I tried using the URL format with

https://<username>:<password>@github.com/<username>/<repo.git>

but that doesn't seem to help: I still get an error that the credentials are invalid for the original account username.

How do I login with multiple sets of credentials or how would I somehow reset the original credentials to force password prompt when pushing?

EDIT:

The only way I managed to push right now is by specifying the username:[email protected]/ in the url in the git push command       

1 Answer

+1 vote
by (63.4k points)

I will tell you how I managed to push,  I specified the username:[email protected]/ in the URL in the git push command

If you want to learn more about Git commands and want to master various aspects of Git architecture then you can join Git Training.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...