I'm trying to use Spring Cloud Services Config Server on Cloud Foundry backed by a github repository. I need to use ssh access because it's a private git repo but I keep getting the error
UnknownHostKey: github.com. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
To create the service I'm using:
cf create-service -c '{"git": { "uri": "ssh://git@github.com/user/myrepo.git", "label": "master", "privateKey":"-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----\n", "hostKey":"AAAA...FFAaQ==", "hostKeyAlgorithm": "ssh-rsa" } }' p-config-server standard config-server
I'm getting the hostKey
directly from my known_hosts file.
I've tried testing it on PCFDev and I get the more generic error message of Unable to reach host.
Even though I can ssh to the app container and clone the repo myself.
I've been following these instructions http://docs.pivotal.io/spring-cloud-services/1-4/common/config-server/configuring-with-git.html#ssh-repository-access.
What am I'm doing wrong?
The Spring Cloud Services team have found a bug on at least 1.11.7+ and probably 1.11.x+ for SCS when using Git SSH configuration for Config Server. They're working on a patch.
So the answer, unfortunately, is to either downgrade or wait for the patch.