Last week a friend of mine cloned her Github repository and did some work on it on my machine. She changed the user config on my machine using the following bash commands:
git config --global user.name "myFriendsUsername" git config --global user.email "myFriendsEmail"
When she was done, she used the same commands to change the user config back to my credentials and I verified this using
git config --global user.name git config --global user.email
which returned my credentials. However, today I cloned a repository of my own, committed some changes and tried to push to origin but it gave me the following error:
remote: Permission to myUsername/myRepo.git denied to myFriendsUsername. fatal: unable to access 'https://github.com/myUserName/myRepo.git/': The requested URL returned error: 403
Are there any settings that I'm possibly neglecting?
git config settings you changed are used when committing changes to a repository, not for authorization:
$ git config --global user.name "Full Name" $ git config --global user.email "firstname.lastname@example.org"
When your friend cloned a git repository, its likely that your computer's credentials manager (Keychain on Mac OS) saved the authorization certificate.
To remove this authorization certificate, open up Keychain, click on All Items and search for
git. You will get some items like this:
After deleting these certificates, Git should prompt you to reauthorize on your next action.
idx = df.index[df.index.duplicated(keep=False)]
idx = df.index[df.groupby(level=0, sort=False)['col'].transform('size') > 1]