Is it necessary to have git repo on openshift only? I already have bitbucket / github git repo and would prefer to push there only. Can I simply hook into it so that openshi
I ran into problems deploying a pre-existing code repository to Openshift. In my particular context, where I tried to deploy a tomcat webapp, the Openshift tomcat configuration files included in the .openshift folder were crucial.
What fixed it for me was the inclusion of the .openshift folder in my existing source tree, as well as the inclusion of the openshift profile in my maven pom.xml file.
This is highly likely the same that would happen by merging your repository with the new openshift upstream one. For me, this is the "why" behind following sentence in adietisheim's great answer:
"In order to then be able to push the code from your local git repo to openshift you first have to merge your openshift repo with your local bitbucket clone."
In my case, this merge was needed to get the config files from the .openshift directory. It took a long time to figure out for me because pushing without the .openshift directory still made my app build and deploy successfully. The only behaviour I saw was a report on missing jsp files, which made me think that the problem was related to my own web.xml and servlet configuration.