git - Custom post-receive hook with gitlab -


i trying set custom post-receive hook using gitlab

i following documentation here

i have executable post-receive file in custom_hooks folder following code:

 !/bin/bash  echo "post-receive firing | wall  git pull 

if run file with:

 ./post-receive 

it works fine. not appear fire @ when push made gitlab repo.

this first time have ever tried web hooks of kind little lost.

a) have above script on remote webserver, inside .git/custom_hooks folder, correct?

b) need in repo?

c) in documentation, specifies should set permissions on file owned 'git' user. have no git user on webserver... other git related files owned user or root.

so assuming doing wrong here, can please put me out of misery , suggest sane way auto push web server whenever push gitlab local machine. feel have spent time looking way , solutions seem complete overkill (cronjob running every few seconds...) or above, not seem work. or @ least seem incapable of making them work.

surely straightforward task...

on file owned 'git' user. have no git user on webserver... other git related files owned user or root.

that because oyur webserver client of gitlab server.
documentation reference configuring gitlab server (adding post-receive hook gitlab repo). hence 'git' user, default 1 on gitlab server.

but if pushing gitlab.com, wouldn't add directly hook.

you need declare web hook, send json message can listen in order trigger action.

if 1 push, you push multiple repos. no hooks involved there, client or server.
local setting valid local cloned repo.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - IIFE: var vs this - is there any difference? -

r - Grow a ffdf data frame on disk gradually -