我将Tomcat 7作为盒式磁带,并按照此处给出的步骤进行操作 - https://www.openshift.com/kb/kb-e1088-how-to-deploy-pre-compiled-java-applications-war-and-ear-files-onto-your-openshift-gear
然而,推动更改的最后一步反复失败。
Vivek N@ACCOUNTINVALID ~/root (master)
$ git push --verbose
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
In Git 2.0, Git will default to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Pushing to ssh://53c810bf5973ca46e70000a1@mailbostonisa-bisa.rhcloud.com/~/git/m
ailbostonisa.git/
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 20.69 MiB | 11.30 MiB/s, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: OPENSHIFT_DEPLOYMENT_TYPE is 'binary' - git-based deployments are disabl
ed.
To ssh://53c810bf5973ca46e70000a1@mailbostonisa-bisa.rhcloud.com/~/git/mailbosto
nisa.git/
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://53c810bf5973ca46e70000a1@mailbostonisa
-bisa.rhcloud.com/~/git/mailbostonisa.git/'
请帮助提出建议
答案 0 :(得分:1)
git pre-receive hook是每次收到推送时在服务器端运行的脚本。此错误表示其服务器拒绝了您的提交。不幸的是,您收到的错误信息量不大。如果您有权访问服务器,请查看./.git/hooks/pre-receive
并确认它没有检查您的代码是否失败。您可以在git hooks上查看http://git-scm.com/book/en/Customizing-Git-Git-Hooks以获取更多信息。