I have installed git, made a git repository and successfully pushed files from there onto my github account. I initiated another git repository with other contents and from there wanted to push onto another github account:
git remote add github <https://...>
git push github master`
This had worked for the first account and repository but when I tried this for my second repository and account it didn't work:
remote: Permission to [2ndAccountName]/[2ndRepositoryName].git denied to [FirstAccountName].
fatal: unable to access 'https://github.com/[2ndAccountName]/[2ndRepositoryName.git/': The requested URL returned error: 403
After having failed to correctly modify the settings so that I can push onto
multiple github accounts on one computer I reinstalled git and just
wanted to use the 2nd account. The github repository for the second account
is still empty and I wanted to push files up there but the same error message was shown.
I just want to push the files onto my 2nd github account.
How does git still remember my FirstAccountName(although I uninstalled and reinstalled it) and how can I delete it so that it will allow me to push onto my second github account?
Setting the global user.name and user.email didn't solve this.
I use git bash.