Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spring config server- for local git repository

I'm trying to setting up spring cloud config server

-Created git repository folder on my local F:\git-local-repository\repository

-linked it using class path link source -Added property file for my service

-After committing my changes on location F:\git-local-repository\repository

-hitting url : http://localhost:8888/limits/default

result in error : org.springframework.cloud.config.server.environment.NoSuchLabelException: No such label: master

Caused by: org.eclipse.jgit.api.errors.RefNotFoundException: Ref master cannot be resolved

Following is my main class of spring boot application

@EnableConfigServer


@SpringBootApplication
public class SpringCloudConfigServerApplication {

public static void main(String[] args) {
    SpringApplication.run(SpringCloudConfigServerApplication.class, args);


}

}

application.properties

spring.application.name=spring-cloud-config-server

server.port=8888

spring.cloud.config.server.git.uri=file:////F:/git-local- 
repository/repository

expected result: will be showing application property details and other url's

like image 335
kiran rathod Avatar asked Mar 17 '26 19:03

kiran rathod


2 Answers

If you are using a local directory for configuration.

Instead of

spring.cloud.config.server.git.uri=file:////F:/git-local-repository/repository

Use

spring.cloud.config.server.native.search-locations=file:////F:/git-local-repository/repository
like image 174
Himadri Mandal Avatar answered Mar 19 '26 07:03

Himadri Mandal


The issue is with extra forward slash. Please change to this :

spring.cloud.config.server.git.uri=file:///F:/git-local- 
repository/repository
like image 36
GnanaJeyam Avatar answered Mar 19 '26 08:03

GnanaJeyam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!