简体   繁体   English

服务器端挂钩托管Git解决方案?

[英]Hosted Git Solution With Server-Side Hooks?

There is already a similar "Hosted Solution for Version Control — with pre-commit hooks?" 已有类似的“版本控制的托管解决方案 - 使用预提交挂钩?” question on SO. 关于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. 但是,提出该问题的用户只需要客户端挂钩,而我正在寻找允许您配置服务器端挂钩的Git主机。

(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.) (我正在寻找这个的原因是我们可以阻止开发人员在特定分支上“推送-f”。客户端钩子对解决这个问题 没有什么 用处。)

So, can anyone recommend a Git host that allows its users to set server-side hooks? 那么,任何人都可以推荐允许其用户设置服务器端挂钩的Git主机吗?

(Bonus points if said host also offers an integrated bug tracker.) (如果主持人还提供集成的bug跟踪器,则可获得奖励积分。)

* 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. 这个问题已经得到了回答,奖金被授予......但如果有任何Git主机可以更容易防止“推-f”(通过提供自己的权限级别,或通过提供发布访问权限)预先接收的钩子,然后让我使用已经写好的/标准的预接收脚本)我很乐意听到它们。

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. 这是一篇非常古老的帖子,但是,我想让人们意识到Assembla现在为Subversion和Git存储库提供服务器端钩子。 These are not like Github's where you have to standup a service to run them. 这些不像Github那样你需要站起来运行它们的服务。 They are fully fledged pre and post commit hooks for git, including the update hook. 它们是完全成熟的git前后提交钩子,包括更新钩子。

Check it out on Assembla Assembla上查看

the list of hooks available on github is here: https://github.com/ {user}/{repository}/admin/hooks github上可用的挂钩列表如下: https//github.com/ {user} / {repository} / admin / hooks

they have a generic post-receive hook, but not a generic pre-receive 他们有一个通用的post-receive钩子,但不是通用的pre-receive

you can code up your own here: https://github.com/github/github-services 你可以在这里编写自己的代码: https//github.com/github/github-services

我以为GitHub允许服务器端挂钩

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; 并且它不像推送-f在像Git这样的分布式系统中具有破坏性; everyone will still have their local copies of the overwritten commits. 每个人仍然会有他们的本地副本的覆盖提交。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM