# Tag Info

22

While the hook is running, GIT_DIR and (if the worktree was defined explicitly) GIT_WORK_TREE are set. That means your pull won't run with the second repository in the directory you changed to. Try git --git-dir ~/websites/testing/.git --work-tree ~/websites/testing pull; or unset git's repo-local environment with this: unset $(git rev-parse ... 8 See :he :autocmd and :he BufWritePost The line would look like this: :autocmd BufWritePost /path/to/file/or/pattern !command <afile> If the <afile> thing does not work use %:p. 7 gitlab already uses the post-receive hook internally. you could fiddle around with that script and call your hook as well, but from the docs it looks like the "official" way would be to use "web-hooks", i.e. let gitlab call your webserver on post-receive and your webserver then pulls the repository. I haven't tried this myself, but since no one answered so ... 6 incron, based on inotify, implements just such a hook in a cron-like way. Unfortunately, it is Linux-specific, not generic to UNIX. 4 As requested, a bit of a tutorial on groups. Hopefully this isn't too elementary. By default, most user accounts are also part of a group of the same name. To determine what groups an account is a member of, use the groups command. # groups root root : root bin daemon sys adm disk wheel The first one listed is the primary group, and will be the default ... 4 You might find incron of interest if you're using Linux. 4 post-commit is a client-side hook and you can not implement it on server. According to Gitlab documentation: http://doc.gitlab.com/ce/hooks/custom_hooks.html, you can implement a server-side custom hook (pre-receive, post-receive, and update) at the server. Examples of server-side git hooks include pre-receive, post-receive, and update. See Git SCM ... 3 You can use hooks to accomplish this. It has been discussed on stackoverflow. http://stackoverflow.com/questions/7147699/limiting-file-size-in-git-repository 3 Yup that is intended behavior. Your bounce doesn't pass check_recipient_access because smtpd directive and from your log, the bounce email never touch smtpd at all (bounce -> qmgr -> lmtp) One possible solution of your problem is using transport_maps instead of check_recipient_access. This directive was invoked by trivial-rewrite process and all email ... 3 If you want to grant a user (such as git in your examples) access to another user's space, put them in the same group and set group rights accordingly. If you need more complex access control list functionality, you should look into POSIX ACLs as provided by getfacl(1) and setfacl(1). 3 The usual way to do something like that is CVS keyword expansion: http://cvsbook.red-bean.com/cvsbook.html#Using%20Keyword%20Expansion A small drawback is, that you'll have the$ signs in the file, but many people are used to this convention.

3

Gitlab doesn't have a post-receive hook since the developers replaced gitolite with gitlab-shell. Therefore you can: sudo -u git bash touch /home/git/repositories/<repository name>.git/hooks/post-receive vim /home/git/repositories/<repository name>.git/hooks/post-receive Make sure the git user has all the permissions needed to run the ...

3

Custom hooks were recently added (since as Gryphius said the regular hooks are used internally): https://github.com/gitlabhq/gitlabhq/blob/667c0a909bde1cf71f21d8ec9768e98b1c489030/doc/hooks/custom_hooks.md You just create a custom_hooks directory in you bare Git repo, and put the hooks in it, and then GitLab makes sure they get run.

3

I'd use incron. This uses the kernel's inotify hooks to run arbitrary commands on specified filesystem events.

2

I was able to accomplish this with ProFTPd & the mod_exec module.

2

Do I need to restart Apache No. SVN-hooks aren't Apache side of game, it's pure Subversion toys, thus - create and use immediately on svn-events

2

Thanks everyone for your answers. I managed to get it working in the end with the help of this post by doing the following: 1. Using Separate Script Add this line to sudoers file (using visudo). gituser ALL=(web-user) NOPASSWD: /usr/local/sbin/startnode Contents of file /usr/local/sbin/startnode changed to following: #!/bin/bash cd ...

2

I don't believe there are any accessible hooks for new user creation in AD. You could do a script to poll for users, keep track of the existing ones, and then provision any new users. I think that's about as good as you're going to get. The other option is to provision your AD users with Python from your intranet side. Creating AD users is fairly easily ...

2

Short Answer: You can't get there from here. Longer Answer: There is no hook for "on account creation". You would have to wrap your user-creation into a script/process that also executes this python script after the account creation. Or, You can change your user-account-creation so that it is done from within a python script (or add those steps to your ...

2

Each argument to the post-update is the name of a ref which was updated by the push, and a branch is a ref whose name looks like refs/heads/<branch> so a script to do what you want would look something like this: #!/bin/sh for ref in "$@" do case "$ref" in refs/heads/*) /path/to/rebuild-site basename $ref;; esac done 2 This is the default behavior of SVN when working with a certificate it does not trust. Take a look at the SSL Certificate Management section in "Version Control with Subversion". If the client receives a server certificate, it needs to verify that it trusts the certificate: is the server really who it claims to be? The OpenSSL library does this ... 2 I think the problem lies in the fact that you've set up a command in the authorized_keys file, but man sshd's section on the authorized_keys file format clearly states: command="command" Specifies that the command is executed whenever this key is used for authentication. The command supplied by the user (if any) is ignored. (…) This means that ... 2 I have had problems with case sensitivity and subversion on windows before. Could that be the problem? I would try this: echo "%VISUALSVN_SERVER%\bin\VisualSVNServerHooks.exe" ^ commit-notification "%1" -r %2 ^ --from <from-email> --to <to-email> ^ --smtp-server <smtp-server> > <somepath>\text.txt Check that the command echoed ... 2 If you are writing to a file, you could just write to "|yourimportscript" and have it run off the piped input. When apache is restarted, it would restart the process. It would spend the majority of its time waiting until it received input and wouldn't require a cron job. You could write your script as a daemon and use famd to see if the file was modified. ... 2 Use svn update instead of svn checkout Make sure that you have Apache setup to ignore svn files 2 Have a look at the plugin Gitlab Merge Request Builder Plugin.Configure the Jenkins From Manage Jenkins and set gitlab url in merger request builder.Follow the instructions on https://github.com/timols/jenkins-gitlab-merge-request-builder-plugin1 1 su - user starts an interactive shell with the user user. You're going to want to use the following: su -c "cd \"$DEPLOYDIR\"; meteor build ." nodejs Dissection: su: su executable -c "COMMAND": run COMMAND as another user nodejs: nodejs user

1

The qemu message protocol (QMP) supports a number of asynchronous messages, including one about restart. If you start your qemu instance with a QMP Server it will report a restart. libvirtd uses QMP to manage qemu guests, so you might try setting something like a proxy qmp server up to look for reboot messages. http://wiki.qemu.org/QMP#Asynchronous_message ...

1

This is blatant self-promotion, but I wrote a Vim plugin that will trigger certain shell scripts to be run after specific Vim autocmd events. For example, a script named .bufwritepost.vimhook.sh would be run (synchronously) every time the BufWritePost command is fired. You could then easily include whatever arbitrary logic you want for doing stuff inside ...

Only top voted, non community-wiki answers of a minimum length are eligible