【问题标题】:How can I get the git repo on my server to automatically sync with changes to the github repo?如何让我的服务器上的 git 存储库自动与 github 存储库的更改同步?
【发布时间】:2013-09-14 13:02:39
【问题描述】:

我有一个 github 存储库,已将其克隆到 ubuntu 服务器上,我可以推送、拉取和提交没有问题。我想知道是否有一种简单的方法可以让当更新被推送到 github 存储库时,我的服务器存储库将收到通知并拉取更改,因为现在我必须登录到服务器并手动拉取。

我知道我可以在我的服务器上设置一个 git 存储库并直接推送到它,但我和我的团队更愿意使用 github 来进行问题跟踪和其他 github 相关功能。

任何帮助将不胜感激。

【问题讨论】:

    标签: git github ubuntu-server


    【解决方案1】:

    首先让你的 git 自动登录,无需密码。在 github 上查看这篇有用的文章 https://help.github.com/articles/why-is-git-always-asking-for-my-password

    接下来,按照此处Git auto-pull using cronjob 的描述添加一个cronjob

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-19
      • 2020-12-14
      • 1970-01-01
      • 2021-03-05
      • 1970-01-01
      相关资源
      最近更新 更多