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

learnAndImprove picture learnAndImprove · Oct 7, 2016 · Viewed 8.5k times · Source

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

Answer

Master Slave picture Master Slave · Oct 7, 2016

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