How to troubleshoot Spring Cloud Services (SCS) for VMware Tanzu - Config Server with Git Backend
search cancel

How to troubleshoot Spring Cloud Services (SCS) for VMware Tanzu - Config Server with Git Backend

book

Article ID: 297093

calendar_today

Updated On:

Products

Support Only for Spring

Issue/Introduction

In the new architecture for Spring Cloud Services (SCS) for VMware Tanzu 3.x, the Config Server instances with Git backends means that a mirror service is created from the external repository, which is then used for serving configuration to backing apps and then client apps.

This article details the same commands run by the mirror service to identify any issues with the external repository such as access, cloning, etc.
  • Create Mirror
    • With SSH
    • With HTTP/S
  • Update Mirror
    • With SSH
    • With HTTP/S
For more information on related Config Server topics, please see the following links:

Resolution

Create Mirror

With SSH URL:
 
# when hostkey check is off
git -c "core.sshCommand=ssh -i <PRIVATE_KEY_FILE> -o StrictHostKeyChecking=no" clone --mirror [email protected] <LOCAL_PATH> 
# when hostkey check is on
git -c "core.sshCommand=ssh -i <PRIVATE_KEY_FILE> -o StrictHostKeyChecking=yes -o UserKnownHostsFile=<KNOWN_HOSTS_FILE>" clone --mirror [email protected] <LOCAL_PATH>

With HTTP/HTTPS URL:
 
# when SSL verification is on
git clone --mirror https://USER_NAME:PASSWORD@URL <LOCAL_PATH> 
# when SSL verification is off
git -c http.sslVerify=false clone --mirror https://USER_NAME:PASSWORD@URL <LOCAL_PATH> 

Update Mirror

With SSH URL:
 
# without hostkey
git -c "core.sshCommand=ssh -i <PRIVATE_KEY_FILE> -o StrictHostKeyChecking=no" fetch origin
# with hostkey
git -c "core.sshCommand=ssh -i <PRIVATE_KEY_FILE> -o StrictHostKeyChecking=yes -o UserKnownHostsFile=<KNOWN_HOSTS_FILE>"  fetch origin

With HTTP/HTTPS URL:
 
git remote set-url origin http://USERNAME:PASSWORD@URL
git fetch origin
# if sslVerify is enabled for https
# git -c http.sslVerify=false fetch origin