github / github/platform-samples

pre-receive hook doesn't run if repository doesn't exist

Open
#171 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Shell
Stars
2.2k
Forks
1.9k
Avg merge
7d 19h
Merged PRs (30d)
1

Description

I've setup a global `pre-receive` hook on my own server (Ubunto 16.04.2 with Git 2.16.2), which works fine with existing repositories. However, if the repository does not exist, the script does not run and I get a client side error instead.
Is there a server side hook I can use that will run when someone tries to push to a repo that doesn't exist? Or, how else can I catch the event?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.