Ok, I'll take a stab at this for 50 extra points ;)
Here are the steps that I followed:
1.) Create php-5.3 application on OpenShift on clone to local machine.
2.) Create public git repository on github to use as the submodule.
3.) Add the github repository to the OpenShift application using the following commands, make sure that you use the https url instead of the git@ url, or you will get private key issues when OpenShift Online tries to checkout the sub-module.
cd into your locally cloned openshift application directory
git submodule add https://github.com/developercorey/somesubmodule.git ./directory_name
git add .
git commit -am "adding a submodule"
git push
If you don't see any errors in your git push, then everything should have worked correctly. if you see an error like this
remote: Host key verification failed.
remote: fatal: Could not read from remote repository.
remote:
remote: Please make sure you have the correct access rights
remote: and the repository exists.
That means you used the git@ url instead of the https url to add your git submodule, or you are trying to access a private repository. Now you can ssh into your application using the rhc ssh
command and cd into your ~/app-root/runtime/repo directory and you should see your submodule directory there with the files from that repository inside.
If that doesn't work for you, please let me know what the output of your git push is and we'll go from there.