Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authentication issue with repo accessed from Spring Cloud Config Server hosted on GitHub

I'm hosting a configuration in a repo on GitHub. If I keep the repo public all's good, but if I make it private I face:

org.eclipse.jgit.errors.TransportException: 
 https://github.com/my-user/my-repo:
 Authentication is required but no CredentialsProvider has been registered

the property I use to target the repo is

spring.cloud.config.server.git.uri=https://github.com/my-user/my-repo

What should I do to configure this properly with the private repo, thanks

like image 547
learnAndImprove Avatar asked Oct 07 '16 17:10

learnAndImprove


People also ask

Which annotation initializes a spring cloud config server?

Spring Cloud Config Server provides an HTTP resource-based API for external configuration (name-value pairs or equivalent YAML content). The server is embeddable in a Spring Boot application, by using the @EnableConfigServer annotation.

Does spring cloud config override properties?

Overriding the Values of Remote Properties If you want to allow your applications to override the remote properties with their own System properties or config files, the remote property source has to grant it permission by setting spring. cloud. config.


1 Answers

you need to add the

spring.cloud.config.server.git.username=your_github_username
spring.cloud.config.server.git.password=your_github_password

and things should workout for you

like image 64
Master Slave Avatar answered Sep 23 '22 01:09

Master Slave