【问题标题】:Unable to Push deployment from Travis ci to cloudcontrol无法将部署从 Travis ci 推送到 cloudcontrol
【发布时间】:2014-06-03 12:37:28
【问题描述】:

无法使用 Travis CI 将部署从 Github 存储库推送到 CloudClontrol,以下是日志:

Deploying application
Warning: Permanently added 'cloudcontrolled.com' (RSA) to the list of known hosts.
To ssh://xxx.git
! [rejected]        HEAD -> master (fetch first)
error: failed to push some refs to 'ssh://awesomeblog@cloudcontrolled.com/repository.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details

有没有办法强制硬推送覆盖远程 git 的状态?

如果您需要查看完整的日志,可以在这里https://s3.amazonaws.com/archive.travis-ci.org/jobs/26330194/log.txt 找到。注意相关日志在最后。

【问题讨论】:

  • 嗯,你按要求做了 git pull 吗?
  • 两个存储库处于非常不同的状态,拉取会有危险吗?另外,我在部署到 Heroku 和 Openshift 时也遇到了类似的情况,其中 heroku/Openshift 的 git 状态与我的 github 存储库的状态完全不同,但它仍然能够通过硬推送部署代码
  • 游戏是互惠的:如果拉是危险的,那么推也是危险的。我真的看不出它怎么可能是其他方式。
  • 我会使用您当前的代码使用git push -f 手动推送一次到云控制,然后 travis-ci 应该能够再次推送。

标签: travis-ci cloudcontrol


【解决方案1】:

Travis CI 发布的新功能解决了这个问题,

他们在部署期间进行推送时添加了 -f 选项。

你需要做的就是添加

edge: true

在您的 yml 文件中描述的 Cloudcontrol 部署选项 http://docs.travis-ci.com/user/deployment/#Other-Providers

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-09-25
    • 1970-01-01
    • 2020-07-01
    • 1970-01-01
    • 2017-08-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多