# How to run git server-side hooks?

**URL:** <https://community.cloudogu.com/t/how-to-run-git-server-side-hooks/885>\
**Category:** SCM-Manager Bug Reports\
**Created:** [September 15, 2022, 6:09am UTC](https://community.cloudogu.com/t/how-to-run-git-server-side-hooks/885 "2022-09-15T06:09:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jw1903](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/jw1903/32/686_2.png) [@jw1903](https://community.cloudogu.com/u/jw1903)\
**Post date:** [September 15, 2022, 6:09am UTC](https://community.cloudogu.com/t/how-to-run-git-server-side-hooks/885/1 "2022-09-15T06:09:12Z")

</div>

- bug description (occurred issue):  
I put my hooks file under repository data\hooks folder, but it can not run correctly.
- expected result / system behavior:  
I want to mirror my git repository.
- observed result / system behavior:  
The hook can not run. (See attached file)
- SCM-Manager version and installed package:  
v2.38.1  
_(Please also add Screenshots of the issue + if possible a trace created by the SCM-Manager support plugin)_  
[hooks.zip](https://community.cloudogu.com/uploads/short-url/inbuzbQCLgf2RYN1dfbDK24PeQE.zip) (2.4 KB)

---

<div class="post-metadata">

**Author:** ![christoph.loose](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/christoph.loose/32/1400_2.png) [@christoph.loose](https://community.cloudogu.com/u/christoph.loose)\
**Post date:** [September 19, 2022, 12:23pm UTC](https://community.cloudogu.com/t/how-to-run-git-server-side-hooks/885/2 "2022-09-19T12:23:35Z")

</div>

Hi @jw1903

thank you for your post in our community forum!

We will have a look at your issue and will come back soon.

---

<div class="post-metadata">

**Author:** ![eheimbuch](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/eheimbuch/32/18_2.png) [@eheimbuch](https://community.cloudogu.com/u/eheimbuch)\
**Post date:** [September 19, 2022, 6:20pm UTC](https://community.cloudogu.com/t/how-to-run-git-server-side-hooks/885/3 "2022-09-19T18:20:03Z")

</div>

Hey @jw1903

The error is that your hooks are not executable.

 ![Screenshot from 2022-09-19 20-15-08](https://europe1.discourse-cdn.com/flex013/uploads/cloudogu2/original/1X/0fd6514970f787ac0599ae0adb6c68fd828d14bb.png)

After granting them execute permission on my system they will work (but not for me 🙂 )

 ![Screenshot from 2022-09-19 20-17-29](https://europe1.discourse-cdn.com/flex013/uploads/cloudogu2/original/1X/f91eca6779b9fa2f6618295836429aee10fda179.png)

Regards, Eduard

---

<div class="post-metadata">

**Author:** ![jw1903](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/jw1903/32/686_2.png) [@jw1903](https://community.cloudogu.com/u/jw1903)\
**Post date:** [September 20, 2022, 1:41am UTC](https://community.cloudogu.com/t/how-to-run-git-server-side-hooks/885/4 "2022-09-20T01:41:34Z")

</div>

Thanks for your reply.  
Can you teach me how to granting execute permission?

The scm-manager use Local System to login

 ![Hook02](https://europe1.discourse-cdn.com/flex013/uploads/cloudogu2/original/1X/d8ced3ae22da6d401b9f5ef450e874854c7a338d.png)

How do I setup the hook file?

 ![Hook03](https://europe1.discourse-cdn.com/flex013/uploads/cloudogu2/original/1X/1ee780e8e91fcd7a36383fc8477da56cf084b9f8.png)

I used Jenkins plugin to instead for now.

---

<div class="post-metadata">

**Author:** ![christoph.loose](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/christoph.loose/32/1400_2.png) [@christoph.loose](https://community.cloudogu.com/u/christoph.loose)\
**Post date:** [September 20, 2022, 2:58pm UTC](https://community.cloudogu.com/t/how-to-run-git-server-side-hooks/885/5 "2022-09-20T14:58:47Z")

</div>

@jw1903 you can find several guides online about how to change permissions. Here is one that I found on [microsoft.com](http://microsoft.com) ["Read & Execute" permissions](https://social.technet.microsoft.com/Forums/windows/en-US/2998a51d-1bb0-4556-86c9-10bbacf07219/quotread-amp-executequot-permissions?forum=winserverfiles)

---

<div class="post-metadata">

**Author:** ![jw1903](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/jw1903/32/686_2.png) [@jw1903](https://community.cloudogu.com/u/jw1903)\
**Post date:** [September 22, 2022, 2:31am UTC](https://community.cloudogu.com/t/how-to-run-git-server-side-hooks/885/6 "2022-09-22T02:31:30Z")

</div>

It does not luck for me. I add the Read & Execute permission for everyone. But it still the same problem.

I think Jenkins plugin is good enough for me now.  
Thanks for your kindly help.

 ![hook01](https://europe1.discourse-cdn.com/flex013/uploads/cloudogu2/original/1X/2edcc4725934438f01335f9c2faac7493558e7b5.png)

---

<div class="post-metadata">

**Author:** ![christoph.loose](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/christoph.loose/32/1400_2.png) [@christoph.loose](https://community.cloudogu.com/u/christoph.loose)\
**Post date:** [December 27, 2022, 9:04am UTC](https://community.cloudogu.com/t/how-to-run-git-server-side-hooks/885/7 "2022-12-27T09:04:17Z")

</div>

Closed on December 27, 2022, 9:04am UTC

I am closing this topic as there has been no activity for more than 30 days.
