Manually update GIT HTTP(s) credentials in Spring Cloud Services (SCS) for VMware Tanzu Config Server
search cancel

Manually update GIT HTTP(s) credentials in Spring Cloud Services (SCS) for VMware Tanzu Config Server

book

Article ID: 297130

calendar_today

Updated On:

Products

Support Only for Spring

Issue/Introduction

In Spring Cloud Services (SCS) for VMware Tanzu 3.1.0–v3.1.5, you cannot update credentials for a Git repository that was originally added to a Config Server service instance using a HTTP or HTTPS URL. This means that if the repository’s credentials are rotated, the Config Server’s mirror service will be unable to update its mirror of the repository. 

See this SCS for VMware Tanzu release note for more information. This article describes the manual steps to update the credentials.

Resolution

1. Identify the directory where the GIT repository is stored.
 
a. Navigate to the Config Server dashboard web page.

b. Identify the directory. For example: `ssh://[email protected]:22/var/vcap/store/mirror/00957ad15f043b124e46eb212e90c4c8/repository.git`, you should take note of the directory, `/var/vcap/store/mirror/00957ad15f043b124e46eb212e90c4c8/repository.git`

2. SSH into the mirror service virtual machine (VM):
bosh ssh -d <spring_cloud_service_deployment> <spring_cloud_services_vm>

3. Edit the GIT config file:
$ sudo -i
$ cd <directory_from_step_one>
$ vi config

The following is a sample Config Server:
[core]
    repositoryformatversion = 0
    filemode = true
    bare = true
[remote "origin"]
    url = https://username:[email protected]/swagataroy/cook-config
    fetch = +refs/*:refs/*
    mirror = true

Note: Edit the `url` value to your meet your needs. 

4. Check that the credentials are correct:
$ var/vcap/data -iname git -type f 
/var/vcap/data/packages/git/<id>/libexec/git-core/git
/var/vcap/data/packages/git/<id>/bin/git
$ GIT_CURL_VERBOSE=1 GIT_TRACE=1
$ <git_path_from_previous_command> fetch origin