Describe the bug
If user have several repos, and each repo has its own ssh credential, Config Server will fail. Please check the below test result.
Sample
Test materials: Private repo A in my account Private repo B in my account Private repo C in other's account Account key A in my account Account key B in my account Private repo C in other's account Deploy key A in repo A Deploy key B in repo B Case A: repo A with account key A as main repo, works Case B: repo B with account key B as main repo, works Case C: repo C with account key C as main repo, works Case D: repo A with deploy key A as main repo, works Case E: repo B with deploy key B as main repo, works Case F: repo A with account key A as main repo, repo B with account key B as additional repo, works Case G: repo A with deploy key A as main repo, repo B with deploy key B as additional repo, NO works Case H: repo A with account key A as main repo, repo C with account key C as additional repo, NO works
It seems that Config Server can't work with multiple repos. The reason case F works is because the two account keys belong to me and either of them can be access to the two repos.
I think the problem is caused by in extractNestedProperties
spring-cloud-config/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/ssh/SshUriPropertyProcessor.java
private Map<String, JGitEnvironmentProperties> extractNestedProperties(
It uses hostname as sshUriPropertyMap's key so in this case, two different github repos will be overridden to use one ssh configuration.
Comment From: alvin-muniz
Any updates on this bug? This is making it so that effectively one cannot set up the config server to meet the standards of my use case.