1
vote
0answers
37 views

Getting new tags in Git Push on pre-receive

I'm using pre-receive hooks in GIT (using bash on Linux) to filter the push that are allowed into my repo. I need to filter the push that developers do into my GIT repo, allowing just pushed with ...
1
vote
0answers
63 views

Gitlab add default post-update

we've setup Gitlab (as was described at official site). All works fine. Now we need to add git hook to new-created projects called post-update (lets say it is located at ...
0
votes
1answer
381 views

How can I configure git to reject large files?

For the 3rd time a developer committed a large file in our git repository (over 100MB). It's really a pain to cleanup. How can I configure git and/or gitolite to prevent large files from ever being ...
0
votes
1answer
437 views

sudoers nopasswd switch user and run node not working

I'm trying to prevent a password prompt on a command that runs node as the www user by adding the following line to the bottom of my /etc/sudoers file: gituser ALL=(ALL) NOPASSWD: /usr/bin/sudo -u ...
4
votes
3answers
10k views

How to setup Gitlab with post-receive hook?

I am using Gitlab on one server and would like to push my git repository on commit of the master branch to another webserver. So when I push a new version of the website the production server gets ...
1
vote
0answers
520 views

post-receive hook permission denied “unable to create file” error

Just got gitolite installed on my webserver and am trying to get a post-receive hook that can point the git dir in apache's direction. This is what my post-receive hook looks like. Got this script ...
3
votes
3answers
768 views

How do I use git-push --mirror with git-shell in SSH?

I am attempting to setup a mirror-to-backup hook in our repositories. The hook is executing a git push --mirror backup@server:path/foo.git. However it fails stating: fatal: What do you think I am? A ...
3
votes
1answer
736 views

Update Git super repository automatically when a submodule gets updated

in our company we have a huge code base (>100000 files) and so we keep it in several git repositories. So we have a forest of repositories and one super repository containing only submodule references ...
0
votes
1answer
294 views

Determine branch in post-update hook

I have a git (gitosis) repo where every developer have a main branch. I have a script in post-update hook that rebuild main web site and test websites for every developer on every PUSH. I want to ...
2
votes
1answer
418 views

Git Server Side Hook using C#

With subversion and VisualSVN I was able to put a .net binary file as the hook using c# and building the assembly. You just put a file called Post-Commit.exe in the hook folder and it works. With git ...
1
vote
2answers
377 views

git post-receive hook never executes

For some reason my post-received hook never executes. It's a simple two liner diagnostic script: echo "test" && touch /tmp/test. When I do git push origin master nothing happens. Does any-one ...
12
votes
6answers
7k views

Git - post-receive hook with git pull “Failed to find a valid git directory”

It's very weird but when setting a git repository and creating a post-receive hook with: echo "--initializing hook--" cd ~/websites/testing echo "--prepare update--" git pull echo "--update ...