- Windows 10 Pro x64
- JDK 11.0.6
- spring-cloud-config-server 2.2.2.RELEASE
I'm setting up Spring Cloud Config server. Works fine with a file system backend. Works fine with a https / basic auth github backend. Now I'm trying to set it up for SSH so I don't have to put my username and password in the config file.
It's my understanding that Spring Cloud Config / jgit will use all the default SSH settings, correct? I have done the following:
ssh-keygen -m PEM -t rsa -b 4096 -C "xxx@xxx.net"
-- took all the default files and NO passphrase. files got created in C:\Users\xxx.ssh.- opened c:\users\xxx.ssh\id_rsa.pub, selected all, c&p to github
- ran
git clone git@github.com:xxx/Config.git
, copied SHA256 fingerprint into yes/no/fingerprint prompt, clone was successful - edited known_hosts and removed IP, so now it just reads
github.com ssh-rsa AAAA...
application.properties:
spring.cloud.config.server.git.uri=git@github.com:xxx/Config.git
spring.cloud.config.server.git.clone-on-start=true
spring.cloud.config.server.git.strict-host-key-checking=false
spring.cloud.config.server.git.skip-ssl-validation=true
This results in:
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:519) ~[jsch-0.1.54.jar:na]
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:146) ~[org.eclipse.jgit-5.1.3.201810200350-r.jar:5.1.3.201810200350-r]
... 31 common frames omitted
Why am I getting an Auth fail?