Relative Content

Tag Archive for githubserver-sidegithooks

Server-side hook on GitHub

I need to prevent secrets from being pushed to my repository, so I’m implementing Git hooks. While client-side hooks are working correctly, they require each user to configure their local .git directory using the command:
git config core.hooksPath .githooks
This dependency on individual user configuration is a limitation, which is why I’d like to switch to a server-side solution.
In the Git documentation, server-side hooks like pre-receive are mentioned as a potential solution. However, I couldn’t find clear instructions on how to implement them on GitHub. Is it possible to implement a server-side hook directly on GitHub? If so, how can this be done?
referance:https://git-scm.com/book/ms/v2/Customizing-Git-Git-Hooks