{"action":"closed","issue":{"url":"https://api.github.com/repos/jbox-web/redmine_git_hosting/issues/585","repository_url":"https://api.github.com/repos/jbox-web/redmine_git_hosting","labels_url":"https://api.github.com/repos/jbox-web/redmine_git_hosting/issues/585/labels{/name}","comments_url":"https://api.github.com/repos/jbox-web/redmine_git_hosting/issues/585/comments","events_url":"https://api.github.com/repos/jbox-web/redmine_git_hosting/issues/585/events","html_url":"https://github.com/jbox-web/redmine_git_hosting/issues/585","id":144028217,"number":585,"title":"Custom hooks bis","user":{"login":"hallux4","id":4824472,"avatar_url":"https://avatars.githubusercontent.com/u/4824472?v=3","gravatar_id":"","url":"https://api.github.com/users/hallux4","html_url":"https://github.com/hallux4","followers_url":"https://api.github.com/users/hallux4/followers","following_url":"https://api.github.com/users/hallux4/following{/other_user}","gists_url":"https://api.github.com/users/hallux4/gists{/gist_id}","starred_url":"https://api.github.com/users/hallux4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hallux4/subscriptions","organizations_url":"https://api.github.com/users/hallux4/orgs","repos_url":"https://api.github.com/users/hallux4/repos","events_url":"https://api.github.com/users/hallux4/events{/privacy}","received_events_url":"https://api.github.com/users/hallux4/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-28T17:08:42Z","updated_at":"2016-04-02T00:55:30Z","closed_at":"2016-04-02T00:55:30Z","body":"Hello,\r\nI try to setup a mirror repository from my redmine_git to github.\r\n\r\nI tried to follow the given information here:\r\nhttps://github.com/jbox-web/redmine_git_hosting/issues/446\r\n\r\nHello,\r\n\r\nThank you for all you work, this plugin rocks, but I'am new to all of this and I need some help.\r\n\r\nI try to setup a mirror repository from my redmine_git to github.\r\n\r\nSo far I can to handle the creation and the deletion of the repository by using incrontab and the github API.\r\nBut now I try to exec the code below in a post-receive hook:\r\n\r\n```\r\ngitinfo=\"git@github.com:/hallux4/$GL_REPO.git\"\r\ngit push --mirror ssh://$gitinfo >> /home/git/tmp.txt 2>&1\r\n```\r\n\r\nI put the file in plugins/redmine_git_hosting/contrib/hooks/post-receive/ and add this in the file you mentioned:\r\n```\r\ngitolite_hook do\r\n    name 'mirror_repo.sh'\r\n    source 'post-receive/mirror_repo.sh'\r\n    destination 'post-receive.d/mirror_repo'\r\n    executable true\r\nend\r\n\r\n```\r\nThen I updated the hook:\r\n`RAILS_ENV=production rake redmine_git_hosting:install_gitolite_hooks`\r\nit will install the hook in ~/gitolite-admin/local/hooks/common/post-receive.d/ directory\r\n\r\nThen I must commit the change and push it, after this it's ok for all the repository.\r\n\r\nBut if I create a new project, the new repository will not have the hook installed.\r\n\r\n**_Do you know what should be done to have the hook added for all the new project ?_**\r\n\r\nThanks for your time^^ Keep up the good work :+1: "}}