Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Push stopped working / hooks/pre-receive cannot be spawn

Edmund Hupf October 29, 2019



we are currently facing an issue with Bitbucket 5.16.3 running on Windows. When trying to push some commits we get some error like:


Pushing to ssh://.....git
error: cannot spawn hooks/pre-receive: No such file or directory
To ssh://....git
! [remote rejected] feature/1234 -> feature/1234 (pre-receive hook declined)
error: failed to push some refs to 'ssh://.....git'


In the Bitbucket log we see the following (after enabling debugging):


2019-10-29 08:53:16,919 INFO [ssh-scm-request-handler] xx @MYOELJx533x14x0 12liqcw XX.XX.XX.XX SSH - git-receive-pack '/test/test12.git' o.h.c.internal.StandardQueryCache HHH000248: Starting query cache at region: query.repositoryBySlug
2019-10-29 08:53:17,029 DEBUG [ssh-scm-request-handler] xx @MYOELJx533x14x0 12liqcw XX.XX.XX.XX SSH - git-receive-pack '/test/test12.git' c.a.s.i.s.g.p.ssh.GitSshScmRequest Started git command receive-pack
2019-10-29 08:53:17,341 DEBUG [ssh-scm-request-handler] xx @MYOELJx533x14x0 12liqcw XX.XX.XX.XX SSH - git-receive-pack '/test/test12.git' c.a.bitbucket.scm.BaseCommand Executed C:\Program Files\git\mingw64\bin\git.exe receive-pack C:\Bitbucket\shared\data\repositories\11
2019-10-29 08:53:17,341 DEBUG [ssh-scm-request-handler] xx @MYOELJx533x14x0 12liqcw XX.XX.XX.XX SSH - git-receive-pack '/test/test12.git' c.a.b.scm.ssh.SshCommandExitHandler C:\Program Files\git\mingw64\bin\git.exe receive-pack C:\Bitbucket\shared\data\repositories\11: (Exit code: 0)
2019-10-29 08:53:17,341 WARN [ssh-scm-request-handler] xx @MYOELJx533x14x0 12liqcw XX.XX.XX.XX SSH - git-receive-pack '/test/test12.git' c.a.s.i.s.g.p.ssh.SshReceivePack test/test12[11]: Git hooks have not been called. Please verify that the hooks are configured correctly - see for details


Reviewing the provided link from the log does not give a clue - hook files are there and atlbitbucket user has full control. Has anyone experienced the same problem and has a solution to this to make it work again?




1 answer

1 accepted

0 votes
Answer accepted
Edmund Hupf October 30, 2019

Solved it myself: Git installation was broken. Uninstalling and installing git to a different path solved the issue.

Gursidak Singh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 25, 2024

@Edmund Hupf can you please explain bit more on this, what steps you actually followed


Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events