将代码从Git / Bitbucket更新到活服务器 [英] Update Code from Git/Bitbucket to live server

查看:396
本文介绍了将代码从Git / Bitbucket更新到活服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有没有免费的服务?如何使用Git / Bitbucket进行更改?

是否可以通过某种可以与cronjob集成的API来实现? 你可以使用 BitBucket服务钩子
它们在使用Bitbucket进行自动化部署,该文章使用 POST服务


Bitbucket POSTs to您指定的服务URL。

每当用户推送到存储库时,服务都会收到 POST

POST 有一个 application / x-www-form-urlencoded 类型。类似于HTTP发布/订阅服务。

有效负载具有有效负载= pr依赖于实际的有效载荷。有效负载是URL编码内容。



POST请求的主体包含有关更改源自的存储库的信息,最近提交的列表以及进行推送的用户。






关于GitHub,请参阅这个过程,它描述了如何使用 Post-receive 挂钩




How can i update my live server with the changes i made through Git/Bitbucket?

Is there any free service ?

Is it possible to do it with some kind of API which can be integrated with cronjob?

解决方案

You could use the BitBucket service hooks.
They are illustrated in "Using Bitbucket for Automated Deployments", and that article uses the POST service.

Bitbucket POSTs to the service URL you specify.
The service receives an POST whenever user pushes to the repository.
The content header of the POST has an application/x-www-form-urlencoded type.
This services behaves similarly to an HTTP publish/subscribe service.
The payload has payload= prepended to the actual payload. The payload is url encode content.

The body of POST request contains information about the repository where the change originated, a list of recent commits, and the user that made the push.


Regarding GitHub, see this process which describes how to use the Post-receive hook

这篇关于将代码从Git / Bitbucket更新到活服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆