Search code examples
travis-cicloudcontrol

Unable to Push deployment from Travis ci to cloudcontrol


Unable to Push deployment from Github repository to CloudClontrol using Travis CI, Below is the log:

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://[email protected]/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

Is there a way to force hard push overriding the status of remote git?

In case you need to see full logs, you can find it here https://s3.amazonaws.com/archive.travis-ci.org/jobs/26330194/log.txt. Note that the relevant log is at the end.


Solution

  • I was able to get this problem solved with new feature released by Travis CI,

    they have added -f option while doing a push during deploy.

    All you need to do is add

    edge: true
    

    option for Cloudcontrol deployment as described here http://docs.travis-ci.com/user/deployment/#Other-Providers , in your yml file