AWS Elastic Beanstalk上的Spring Cloud Config Server

时间:2018-06-16 15:52:38

标签: spring amazon-web-services server elastic-beanstalk config

我有一个spring boot配置服务器,可以在我的本地机器上正常工作。当我尝试部署到AWS Elastic Beanstalk时,我收到以下错误消息:

Caused by: org.eclipse.jgit.errors.TransportException: ssh://...: reject HostKey: ...
    at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:160) ~[org.eclipse.jgit-4.8.0.201706111038-r.jar!/:4.8.0.201706111038-r]
    at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137) ~[org.eclipse.jgit-4.8.0.201706111038-r.jar!/:4.8.0.201706111038-r]
    at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:274) ~[org.eclipse.jgit-4.8.0.201706111038-r.jar!/:4.8.0.201706111038-r]
    at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:169) ~[org.eclipse.jgit-4.8.0.201706111038-r.jar!/:4.8.0.201706111038-r]
    at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136) ~[org.eclipse.jgit-4.8.0.201706111038-r.jar!/:4.8.0.201706111038-r]
    at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122) ~[org.eclipse.jgit-4.8.0.201706111038-r.jar!/:4.8.0.201706111038-r]
    at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1236) ~[org.eclipse.jgit-4.8.0.201706111038-r.jar!/:4.8.0.201706111038-r]
    at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:234) ~[org.eclipse.jgit-4.8.0.201706111038-r.jar!/:4.8.0.201706111038-r]
    ... 117 common frames omitted
Caused by: com.jcraft.jsch.JSchException: reject HostKey: ...
    at com.jcraft.jsch.Session.checkHost(Session.java:789) ~[jsch-0.1.54.jar!/:na]
    at com.jcraft.jsch.Session.connect(Session.java:345) ~[jsch-0.1.54.jar!/:na]
    at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:117) ~[org.eclipse.jgit-4.8.0.201706111038-r.jar!/:4.8.0.201706111038-r]
    ... 124 common frames omitted

我的application.properties文件是这样的:

spring.cloud.config.server.git.uri=ssh://git:...
spring.cloud.config.server.git.skipSslValidation=true
spring.cloud.config.server.git.clone-on-start=true

任何建议,如何将配置服务器部署到AWS?

0 个答案:

没有答案