简体   繁体   中英

spring cloud config server - No such label: master

My cloud config server was returning the property files but now I am seeing the below error. Please can you let me know how this can be fixed?

This is deployed in pivotal cloud foundry environment.

{
"timestamp": 1464375520539
"status": 404
"error": "Not Found"
"exception": "org.springframework.cloud.config.server.environment.NoSuchLabelException"
"message": "No such label: master"
"path": "/couchbase-data/dev"
}

application.yml

---
spring:
  cloud:
    config:
      server:
        git:
          uri: https://github.company.com/username/ordering-properties
          username: username
          password: "{cipher}03f0ac5cc43d913bbd45155f852d1e5c88542878491a1fc89185feea93a40084"
          search-paths: couchbase-data

security:
  basic:
    enabled: true
  user:
    name: ordering_config
    password: "{cipher}dc56acf65f93b5485c87de1a9965e76a2d0b642a0839027deffdbc35f922746f"

manifest.yml

 ---
    name: orderingconfigserver
    memory: 2048M
    instances: 1
    timeout: 180
    env:
      ENCRYPT_KEY: ORDERING

After I deploy the app , the first hit to the endpoint returns the below error :

{
"timestamp": 1464377154415
"status": 500
"error": "Internal Server Error"
"exception": "java.lang.IllegalStateException"
"message": "Cannot clone or checkout repository"
"path": "/couchbase-data/dev"
}

If your git repo has the main branch name as "main" instead of "master", I would recommend you to add a new property to change default-label as below:

spring.cloud.config.server.git.default-label=main

Check this link for additional info.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM