Troubleshooting Config Server Service Instance creation failure when using SSH protocol
search cancel

Troubleshooting Config Server Service Instance creation failure when using SSH protocol

book

Article ID: 298319

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

When creating a Spring Cloud Service Config Server Instance with a git url using SSH protocol

CF-ServiceBrokerBadResponse(10001): Service broker error: Git URI ssh://[email protected]:remote-repo/config-files could not be cloned.
Please verify your Git repo configuration

Means that the service broker unsuccessful in accessing or cloning the nominated remote-repo


Environment

Product Version: 2.11

Resolution

Here are some steps to troubleshoot the issue:

  • Check here for common errors in cloning i.e. check spelling, supplying correct ssh key, check if you have the necessary access and permissions, etc. Please also make sure you use RSA key (privateKey).
  • Check SCS service broker logs for more info, here are steps in accessing service broker logs:
CF-ServiceBrokerBadResponse(10001): Service broker error: Git URI ssh://[email protected]:remote-repo/config-files could not be cloned. Please verify your Git repo configuration org.cloudfoundry.client.v2.ClientV2Exception: CF-ServiceBrokerBadResponse(10001): Service broker error: Git URI ssh://[email protected]:remote-repo/config-files could not be cloned. Please verify your Git repo configuration at org.cloudfoundry.reactor.util.ErrorPayloadMappers.lambda$null$0(ErrorPayloadMappers.java:49) ~[cloudfoundry-client-reactor-4.16.0.RELEASE.jar !/:na] Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException
  • If the service broker logs does not provide more details (like the logs above), try checking mirror-service logs which can be found at /var/vcap/sys/log/mirror-service directory in the SCS broker VM in SCS bosh deployment.
2022-09-13 03:38:44.653 ERROR 5 --- [ctor-http-nio-1] s.c.m.b.DelegatingServiceInstanceService : Git URI ssh://[email protected]/louannO/CKAD-exercises could not be cloned. Please verify your Git repo configuration

io.pivotal.spring.cloud.mirrorservice.core.CreateMirrorException: Git URI ssh://[email protected]/remote-repo/config-files could not be cloned. Please verify your Git repo configuration
    at io.pivotal.spring.cloud.mirrorservice.mirrors.ShellSshMirrorServer.mirrorRepo(ShellSshMirrorServer.java:200) ~[classes!/:] ....Caused by: io.pivotal.spring.cloud.mirrorservice.mirrors.ShellCommandException: Shell command failed with exception
    at io.pivotal.spring.cloud.mirrorservice.mirrors.ShellUtil.doShellCommand(ShellUtil.java:56) ~[classes!/:]
    at io.pivotal.spring.cloud.mirrorservice.mirrors.ShellUtil.doShellCommand(ShellUtil.java:23) ~[classes!/:]
    at io.pivotal.spring.cloud.mirrorservice.mirrors.ShellSshMirrorServer.lambda$mirrorSshRepo$1(ShellSshMirrorServer.java:162) ~[classes!/:]
    at io.pivotal.spring.cloud.mirrorservice.mirrors.ShellSshMirrorServer.mirrorRepo(ShellSshMirrorServer.java:195) ~[classes!/:]
    ... 118 common frames omitted
Caused by: io.pivotal.spring.cloud.mirrorservice.mirrors.ShellCommandException: Shell command failed with exit code: 128

The error command means a ssh shell command was executed fails
 

  • If the mirror-service did not provide much info like the logs above. Try to mimic the exact command that SCS runs to clone the repo (by mirror service):
git -c core.sshCommand="ssh -vvv -i ./private-key -o StrictHostKeyChecking=no -o UserKnownHostsFile=./known-hosts" clone --mirror ssh://[email protected]/remote-repo/config-files

Where:

private-key : file should have the key your providing in payload with owner-only read permission (0600)
known-hosts contains a single line like:

bitbucket.org <host-key-algorithm> <host-key> 

So you should be able to run above command locally and get more info as to why ssh is failing.