问题
Hi guys I could do that but not anymore i.e. I could upload changes to openshift git.
I have tried resetting git repo, push by force but no success.
Here is the log that I get through:
Amits-MacBook-Pro:api $ git push origin master --force
Counting objects: 33, done. Delta compression using up to 4 threads.
Compressing objects: 100% (32/32), done. Writing objects: 100%
(33/33), 1.46 MiB | 0 bytes/s, done. Total 33 (delta 16), reused 0
(delta 0) remote: Postgres already stopped remote: Stopping NodeJS
cartridge remote: No such file or directory -
/var/lib/openshift/.../app-deployments/2015-07-19_07-38-12.349/metadata.json
To ssh://...@api-tmate.rhcloud.com/~/git/api.git/ ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'ssh://...@api-tmate.rhcloud.com/~/git/api.git/'
回答1:
Found a quick solution here now that login through SSH and delete everything that you have within app-deployments folder.
if you in the mac then use this command to delete everything within app-deployments.
rm -rf *
* NOTE: Your current directory should be app-deployments from where you will run this command.*
回答2:
I experienced the same phenomenon but I noticed it was happening when I was running in '--no-auto-deploy' mode. When I changed it back to auto-deploy, the life-cycle execution ensured the expected effect of the push.
来源:https://stackoverflow.com/questions/31500811/unable-to-push-changes-to-git-openshift