0

So I was play around with github but something really weird happened. I have a private repo on my main github account and I added my other account as a contributor. Later I removed it as a contributor but somehow it is still able to push to my main account's repository. I don't know how I can fix this.

Eric
  • 77
  • 9
  • 1
    Do you mean the other account still appears in git's history or in the "contributors" screen ? – LeGEC Jul 28 '20 at 06:21
  • A good check to distinguish where things are going wrong would be opening a pull request and trying to merge (or just review) it as your other account. If you can merge it, the problem is that they’re still being granted permissions on GitHub. If you can’t, the problem is either that you’re misinterpreting commit history as permissions like others have mentioned, or unintentionally using your main account (maybe its SSH key or stored HTTP credentials). – Ry- Jul 28 '20 at 06:40

1 Answers1

1

The credentials of an account are checked when pushing to your GitHub repo.
In this context : the only accounts that can actually push to the repo are the accounts listed as collaborators.

There two other places where the name associated with an account appears : a commit's author and committer.
These fields are part of your repo's history, and have nothing to do with the credentials of the pusher.
In fact : you could push a branch which contains commits authored by someone else entirely.


If you want to change your repo so that your public account does not appear in the history anymore, search for "rewriting history edit author and committer"

On SO :

LeGEC
  • 46,477
  • 5
  • 57
  • 104
  • Oh right later I found an article that talks about credential and I found that I didn't sign up. Then I re tried everything it worked as I expected. Thank you for the help!!! – Eric Jul 30 '20 at 02:13