I am trying to use AWS CodeCommit repository with spring cloud config. I have managed to get it working with SSH. But I would like to use https instead of SSH. AWS suggest to use credential helper. Does anyone know how can I configure spring config cloud to use credential helper? I have looked AWS CodeCommit HTTPS access without setting up credential helper But there is no answer yet and I was wondering if there is some way in spring cloud config to do it.
相关问题
- java.lang.IllegalArgumentException: Cannot set to
- How to generate 12 digit unique number in redshift
- Use awslogs with kubernetes 'natively'
- Spring Data MongoDB - lazy access to some fields
- Declaring an explict object dependency in Spring
相关文章
- java JDK动态代理和cglib动态代理最后获取的代理对象都为null的问题
- org.xml.sax.SAXParseException; lineNumber: 7; colu
- SpringMVC如何把File封装到Map中?
- Right way to deploy Rails + Puma + Postgres app to
- how many objects are returned by aws s3api list-ob
- Spring: controller inheritance using @Controller a
- How to load @Configuration classes from separate J
- Java spring framework - how to set content type?
I don't know if you have seen this answer yet, but this explains a little bit and the example with JGit works. AWS CodeCommit HTTPS access without setting up credential helper
Since Spring Cloud Config doesn't yet support adding custom Credential providers you need to implement your own EnvironmentRepository.
For a POC I overrode the JGitEnvironmentRepository, and had to copy almost all the code because what I really needed to override was a private method JGitEnvironmentRepository#setCredentialsProvider. That method is where I used the code from the example I provided above.
Spring Cloud Config uses an auto config to build their MultipleJGitEnvironmentRepository bean and it is annotated with @ConditionalOnMissingBean(EnvironmentRepository.class), so as long as you create a bean of that type you can override their behavior.
So with that said the SSH option is a lot cleaner until Spring expands their support for configuring custom Credential Providers or first class support for CodeCommit.
Open issue for AWS CodeCommit: https://github.com/spring-cloud/spring-cloud-config/issues/334
Duplication of a similar question and solution is posted there. AWS CodeCommit HTTPS access without setting up credential helper