Home > front end >  Does Git or GitHub notify the code owner of a failed attempt to push on master?
Does Git or GitHub notify the code owner of a failed attempt to push on master?

Time:06-13

By mistake I attempted to push some changes to master that should have been done to branch. The attempt was failed as I am not the code owner. But I am curious if the code owner is anyhow notified of that? I would hope it is not D:

CodePudding user response:

It's hard to say without knowing what's running on the server side. Git doesn't have the concept of a code owner, but many servers do, and there is generally the concept of an authorized user.

GitHub (as well as most other hosting platforms) typically don't. The reason is that there are many reasons why such an operation could fail: the actual owner typoed their credentials, the actual owner has credentials that don't grant them access (e.g., a GitHub token with the wrong scope), or a scraper is attempting to find compromised systems. Notifying the user every time access failed would create a lot of noise, especially because many repositories see a lot of automated activity, and sending an email just because someone was trying to brute-force credentials would be extremely annoying.

CodePudding user response:

Git (the software) doesn't have the concept of a "code owner". Platforms such as GitLab do.

As far as I know, there are no notifications to anybody about failed pushes. The server might write this event to their logs. Since the push didn't succeed, there's no point in notifying the code owner.

  • Related