I have used one Github account to push an android project to Github from Android Studio. Now I have created another account on Github and want to push my another android project
Perhaps not the answer you are wanting, but you can probably solve this by finding out where the project code is stored by android studio and changing the git remote there.
For example, if you want to change where the main repository you push to, enter this in the command line when inside the project directory:
git remote set-url origin <new-url-from-github>
I had the same problem and had solved it.
With current Android Studio 3.5 we can add several github account
with several github account added we can select one for the default for specific project.
or
change the git username and email:
add --global if you want change for global config
Go to:
Setting --> Version Control --> GitHub --> Change you username.
In my case none of working. This way works for me.
Steps:
Now its time to Push your source code to Git, Android studio would ask for new username and its password.
Reference screenshot.
Done
Change file config
in directory .git
that located in your project folder
In terminal @ current project, type:
git credential-manager uninstall
Cheers~
I solved mine with re-installing,
git credential-manager uninstall
then
git credential-manager install
push to repo
git push --set-upstream origin master
this will ask for authentication, authenticate and BoooMMMM!!!