Questions tagged [hook]

44 questions
19
votes
3 answers

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 updated. I know this should be possible with hooks…
tvb
  • 341
  • 1
  • 2
  • 8
18
votes
6 answers

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 completed--" the hook runs indeed, but it never manage to…
zanona
  • 335
  • 2
  • 3
  • 8
16
votes
4 answers

Vim - Trigger action\script on save\write?

This might be better for super user, but I figure as a tool of the trade it might be a better topic for here. I find often when editing in vim that I exit out, run some script that I am testing, and then go back into vim (yes I realize I can use…
Joshua Enfield
  • 3,404
  • 8
  • 41
  • 58
10
votes
3 answers

Triggering Jenkins build for merge request from GitLab web hook

I want Jenkins (1.561) to build merge (pull) requests submitted to GitLab (6.7.5), triggered by a merge request web hook. I have a parameterised build, and the Jenkins plugins "GitLab Merge Request Builder" (1.2.0) and "GitLab Hook" (1.0.0).…
Martin Lehmann
  • 201
  • 1
  • 2
  • 6
6
votes
1 answer

GitLab CE post-commit custom hook not working

I use GitLab Community Edition 8.2 and want to add post-commit hook. I created file path_to_project.git/custom_hooks/post-commit with rights $ ls -l1 custom_hooks/post-commit -rwxr-xr-x 1 git git 45 Dec 14 21:31 custom_hooks/post-commit and…
strangeman
  • 433
  • 5
  • 19
6
votes
2 answers

SFTP post upload hook

How would I run a script after a file has been successfully uploaded over (a chrooted) SFTP? I have this working on standard FTP connection using PureFTP http://linux.die.net/man/8/pure-uploadscript I'm running Debian Squeeze
Petah
  • 650
  • 2
  • 13
  • 24
5
votes
2 answers

UNIX - How to give user rights over another user and so I don't need to sudo or type password?

I have 2 users in question • git user - used for gitosis - so it's a No password user and it can be accessed only through root... • user user - where my files reside so what I would like to do is give the user git rights to navigate to a luddico…
zanona
  • 335
  • 2
  • 3
  • 8
4
votes
2 answers

Extract data that Jenkins receives from POST hooks sent by eg. github or bitbucket

I have a Jenkins job Trigger builds remotely (e.g., from scripts), and bitbucket PULL request HOOK triggers that job we can say everything works fine. Jenkins is smart to check any change and build them. On each build there is data that is changed…
titus
  • 404
  • 6
  • 17
4
votes
1 answer

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 committed into the repo? Thanks a lot.
MiniQuark
  • 3,695
  • 2
  • 20
  • 23
4
votes
1 answer

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 on top of that. The idea is to have the super…
filodej
  • 41
  • 2
4
votes
1 answer

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 I am guessing because it is running thorugh…
user58469
3
votes
3 answers

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 shell? fatal: The remote end hung up…
Danny
  • 311
  • 3
  • 10
3
votes
2 answers

SVN: Error validating server certificate for svn hook linux

I managed to setup a SVN (over SSL) server and TortoiseSVN client on Win. I made a Post-Commit Hook for test project. The Post-Commit will update the web dir so the App in PHP can be executed with the newest version. It all works when done over…
Dr Casper Black
  • 605
  • 1
  • 7
  • 12
3
votes
2 answers

Unix filesystem hook

I'd like to add a hook to the file system, so I can execute a process whenever a specific file is read from disk. Does *nix provide a way to create such a hook? (I have root access)
3
votes
1 answer

libvirt, qemu, reboot hook

Is it possible to detect that the guest VM has rebooted and perform an action using libvirt / qemu? The hooks here only support the "start" and "stop" events. I would like to detect if my VM has rebooted. HOST is running ubuntu 10.04 GUEST is…
bradgonesurfing
  • 261
  • 1
  • 4
  • 6
1
2 3