spring cloud config server - 没有这样的标签:master

时间:2016-05-27 19:01:19

标签: spring spring-boot pivotal-cloud-foundry spring-cloud-config

我的云配置服务器正在返回属性文件,但现在我看到以下错误。请告诉我这是如何解决的?

这部署在关键的云代工环境中。

{
"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

部署应用程序后,第一次点击到端点会返回以下错误:

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

1 个答案:

答案 0 :(得分:1)

如果您的 git repo 的主分支名称为“main”而不是“master”,我建议您添加一个新属性来更改默认标签,如下所示:

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

查看此 link 以获取更多信息。