Spring Config Server - 没有这样的标签:master [英] Spring Config Server - No such label: master
问题描述
我有一个简单的 Spring Cloud Config Server,它使用来自 git 服务器的配置.
I have a simple Spring Cloud Config Server which consume configuration from git server.
ConfigServer bootstrap.yml :
ConfigServer bootstrap.yml :
spring:
application:
name: config-service
cloud:
config:
server:
git:
uri: ssh://git@mydomain:myport/myrepo.git
searchPaths: "configurations/{application}/{profile}"
server:
port: 8888
当我在本地部署 ConfigServer 时,我可以从 http://localhost:8888/myapp/test
检索配置.但是当我在测试服务器上部署 ConfigServer 时,当我点击 http://testserverip:8888/myapp/test
时,它会抛出 No such label: master
.
When I deploy ConfigServer on local, I can retrieve configuration from http://localhost:8888/myapp/test
. But when I deploy ConfigServer on test server, it throws No such label: master
when I hit http://testserverip:8888/myapp/test
.
任何帮助将不胜感激!
推荐答案
当您的服务无法访问 Git 存储库时会发生这种情况.由于您可以启动您的应用程序,我假设测试服务器可以访问 Git.您应该为您的 Git 服务器设置 SSH 身份验证.您可以查看此站点以了解 SSH 配置.
This happens when your service cannot access to Git repository. Since you can start your application, I assume test server can reach to Git. You should set up SSH authentication to your Git server. You can check this site for SSH configuration.
这篇关于Spring Config Server - 没有这样的标签:master的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!