npm git cloning private bitbucket repository with ssh key on openshift
Simple approach on using alternate ssh-keys to use with private repositories on openshift
an openshift application does not have a .ssh folder
nor can it be created
therefore, it can be created in the $OPENSHIFT_DATA_DIR directory
but how to let git- or npm use this directory (and its keys) ?
Solution step #1: generate an sshkey!
login to your openshift application ('foo' e.g.)
$ rhc ssh foo
go to the data dir and create an ssh-key like so:
$ cd $OPENSHIFT_DATA_DIR
Generating public/private rsa key pair.
Enter file in which to save the key (/var/lib/openshift/54228f2a5973ca43cc000b8e/.ssh/id_rsa): /var/lib/openshift/3cc000b8e/app-root/data/id_rsa
Make sure you enter the right directory in the 'Enter file in which..'-prompt (hence the 'pwd' command)