Hosted Git Solution With Server-Side Hooks?

Deadly 提交于 2019-12-07 01:53:32

问题


There is already a similar "Hosted Solution for Version Control — with pre-commit hooks?" question on SO. However, the user who asked that question only needed client-side hooks, and I'm looking for a Git host that allows you to configure server-side hooks.

(The reason I'm looking for this is so that we can prevent developers from being able to "push -f" on specific branches. Client-side hooks are of no minimal use for solving this problem.)

So, can anyone recommend a Git host that allows its users to set server-side hooks?

(Bonus points if said host also offers an integrated bug tracker.)

* EDIT *

This question has already been answered, and the bounty awarded ... but if there are any Git hosts out there that make it easier to prevent "push -f" (either by providing that level of permissioning themselves, or by providing access to publish pre-recieve hooks, which would then let me use already-written/standard pre-recieve scripts) I would LOVE to hear about them.


回答1:


the list of hooks available on github is here: https://github.com/{user}/{repository}/admin/hooks

they have a generic post-receive hook, but not a generic pre-receive

you can code up your own here: https://github.com/github/github-services




回答2:


This is a very old post, however, I wanted to make people aware that Assembla now offers Server Side Hooks for Subversion and Git repositories. These are not like Github's where you have to standup a service to run them. They are fully fledged pre and post commit hooks for git, including the update hook.

Check it out on Assembla




回答3:


I thought GitHub allows server side hooks




回答4:


Just tell the developers not to do this, and add a client-side hook as a precaution if you're worried about accidents. If you worry about developers breaking policy by shoving up to master anyway, surely you have bigger problems than this. And it's not like a push -f would be destructive in a distributed system such as Git; everyone will still have their local copies of the overwritten commits.



来源:https://stackoverflow.com/questions/8828153/hosted-git-solution-with-server-side-hooks

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!