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

spring cloud config server: git searchpaths
spring cloud config server without git example
spring cloud config server: git default label
spring cloud config multiple profiles
spring cloud config server github
spring cloud config server: vault
spring cloud config server: native: searchlocations
spring cloud config server with example in a spring boot app tech primers

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:

 Authentication is required but no CredentialsProvider has been registered

the property I use to target the repo is

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

you need to add the

and things should workout for you

spring-cloud/spring-cloud-config, I have simple spring boot config server application. My backend is gitlab and it is private repository. I can't get it working by providing authentication information. together to host and review code, manage projects, and build software together. I also faced a similar problem with spring cloud config server. Set up a Spring Cloud Config Server instance for your service. 10/18/2019; 8 minutes to read +4; In this article. This article shows you how to connect a Spring Cloud Config Server instance to your Azure Spring Cloud service. Spring Cloud Config provides server and client-side support for an externalized configuration in a distributed system.


I am running this as docker, and it worked for me

for started this how I am using spring cloud server as docker container

container_name: sccserver
  - 8080:8080
  - /data/config-dir:/data
  - scc_search_paths={application}, {application}/extended-attributes, {application}/feature-flags, {application}/properties, {application}/error-codes,{application}/seed-data,{application}/globalization,{application}/json-validator-schema,{application}/seedData
  - "JAVA_OPTS=-Xmx512m"
  - "dockerhost:$DOCKERHOST"


spring config server :Cannot clone or checkout repository , You should use a server to host your configuration repositories in production. Spring Cloud Config Server supports a git repository URL with placeholders spring: cloud: config: server: git: uri:{application} AWS CodeCommit uses an authentication helper when using Git from the command line. The sample has a test case where the config server is also started in the same JVM (with a different port), and the test asserts that an environment property from the git configuration repo is present. To change the location of the config server, you can set in bootstrap.yml (or in system properties and other places).

It's not recommended to hardcode GitHub username and password into application.yml. You'll be at risk of leaking GitHub account and open access of your config repository to anyone on the web.

You can use ssh as authentication method by adding the following configuration:

          searchPaths: licensingservice,organizationservice
          private_key_file: ~/.ssh/github_rsa

As GitHub has updated authentication algorithm, if you're using earlier version of spring cloud, you'll also need to add the following dependency to pom.xml:


2. Spring Cloud Config Server, Spring Cloud Config provides server-side and client-side support for externalized spring: cloud: config: server: git: uri: config-repo word application- to prevent issues resolving the correct property source. host. The host of the proxy. port. The port with which to access the proxy. Dismiss Join GitHub today. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.

Spring Cloud Config Server client, Spring Config Server allows to fetch a configuration from the remote git config: server: git: uri: username: The repository is accessed by using JGit, so any documentation you find on Turns out the problem is hidden in the bowels of Mac OS Mojave� The default implementation of EnvironmentRepository uses a Git backend, which is very convenient for managing upgrades and physical environments and for auditing changes. . To change the location of the repository, you can set the configuration property in the Config Server (for example in application.ym

Solved, I had trouble getting this to work against my Github account using a private repo. It's unclear why it fails, JGit just say "not authorized", which I� server.port defines the port on which the embedded server will start. will bind the git location to look for the configuration. Here we are using local git repo but can be switched to remote got location by just changing this location.

Git Backend not working for Spring Config server, Learn how to set up a Spring Cloud Config Server instance for your Azure Spring Cloud on the Azure portal. Azure Spring Cloud supports Azure DevOps, GitHub , GitLab, and Bitbucket for Private repository with SSH authentication private- key, No, The SSH private key to access the Git repository,� Like all Spring Boot applications, it runs on port 8080 by default, but you can switch it to the more conventional port 8888 in various ways. The easiest, which also sets a default configuration repository, is by launching it with (there is a configserver.yml in the Config Server jar).

  • the private_key_file is not present in docs, and actually not working for me. Is it removed now?
  • @mCs I checked and found it is not in the latest docs. But it truly works and a log of examples and gists contain this setting. Maybe you can consider store the privateKey in an environment variable instead.
  • How to use PK form environment var?
  • private_key_file property does not work. I got the help from this… and it solved my problem.