I am trying to connect to private gitlab self hosted service with ssh key. Following is the yaml config
spring:
cloud:
config:
server:
git:
uri: git@gitlab.devops.***/config_src.git
ignoreLocalSshSettings: true
host-key: --
strictHostKeyChecking: false
hostKey: someHostKey
hostKeyAlgorithm: ssh-rsa
privateKey: | ***
Also i tried playing around with the config and ~/.ssh/config with following settings ``` StrictHostKeyChecking no PreferredAuthentications publickey IdentitiesOnly yes IdentityFile ~/.ssh/***private ServerAliveInterval 60 ServerAliveCountMax 5
``` Receiving exact same error as https://github.com/spring-cloud/spring-cloud-config/issues/1447 tried the suggestions provided there as well. Tried in intellij also in iterm console.
Some pointers to fixing this would be helpful, thanks in advance
org.eclipse.jgit.api.errors.TransportException: git@gitlab.devops.mhealth.tech:shivhg/config_src.git: remote hung up unexpectedly
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:254) ~[org.eclipse.jgit-5.1.3.201810200350-r.jar:5.1.3.201810200350-r]
at org.eclipse.jgit.api.CloneCommand.fetch(CloneCommand.java:306) ~[org.eclipse.jgit-5.1.3.201810200350-r.jar:5.1.3.201810200350-r]
at org.eclipse.jgit.api.CloneCommand.call(CloneCommand.java:200) ~[org.eclipse.jgit-5.1.3.201810200350-r.jar:5.1.3.201810200350-r]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.cloneToBasedir(JGitEnvironmentRepository.java:589) [spring-cloud-config-server-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.copyRepository(JGitEnvironmentRepository.java:564) [spring-cloud-config-server-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.createGitClient(JGitEnvironmentRepository.java:547) [spring-cloud-config-server-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.refresh(JGitEnvironmentRepository.java:268) [spring-cloud-config-server-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.cloud.config.server.environment.JGitEnvironmentRepository.getLocations(JGitEnvironmentRepository.java:246) [spring-cloud-config-server-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentRepository.getLocations(MultipleJGitEnvironmentRepository.java:146) [spring-cloud-config-server-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.cloud.config.server.environment.AbstractScmEnvironmentRepository.findOne(AbstractScmEnvironmentRepository.java:51) [spring-cloud-config-server-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentRepository.findOne(MultipleJGitEnvironmentRepository.java:186) [spring-cloud-config-server-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.cloud.config.server.environment.CompositeEnvironmentRepository.findOne(CompositeEnvironmentRepository.java:52) [spring-cloud-config-server-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.cloud.config.server.config.ConfigServerHealthIndicator.doHealthCheck(ConfigServerHealthIndicator.java:73) [spring-cloud-config-server-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:82) [spring-boot-actuator-2.1.8.RELEASE.jar:2.1.8.RELEASE]
at org.springframework.boot.actuate.health.CompositeHealthIndicator.health(CompositeHealthIndicator.java:95) [spring-boot-actuator-2.1.8.RELEASE.jar:2.1.8.RELEASE]
at org.springframework.boot.actuate.health.HealthEndpoint.health(HealthEndpoint.java:50) [spring-boot-actuator-2.1.8.RELEASE.jar:2.1.8.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282) [spring-core-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker.invoke(ReflectiveOperationInvoker.java:76) [spring-boot-actuator-2.1.8.RELEASE.jar:2.1.8.RELEASE]
at org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredOperation.invoke(AbstractDiscoveredOperation.java:60) [spring-boot-actuator-2.1.8.RELEASE.jar:2.1.8.RELEASE]
at org.springframework.boot.actuate.endpoint.jmx.EndpointMBean.invoke(EndpointMBean.java:121) [spring-boot-actuator-2.1.8.RELEASE.jar:2.1.8.RELEASE]
at org.springframework.boot.actuate.endpoint.jmx.EndpointMBean.invoke(EndpointMBean.java:96) [spring-boot-actuator-2.1.8.RELEASE.jar:2.1.8.RELEASE]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [na:1.8.0_201]
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [na:1.8.0_201]
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) [na:1.8.0_201]
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) [na:1.8.0_201]
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) [na:1.8.0_201]
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) [na:1.8.0_201]
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) [na:1.8.0_201]
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) [na:1.8.0_201]
at sun.rmi.transport.Transport$1.run(Transport.java:200) [na:1.8.0_201]
at sun.rmi.transport.Transport$1.run(Transport.java:197) [na:1.8.0_201]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_201]
at sun.rmi.transport.Transport.serviceCall(Transport.java:196) [na:1.8.0_201]
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573) [na:1.8.0_201]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834) [na:1.8.0_201]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688) [na:1.8.0_201]
at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_201]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687) [na:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_201]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_201]
Caused by: org.eclipse.jgit.errors.TransportException: git@gitlab.devops.mhealth.tech:shivhg/config_src.git: remote hung up unexpectedly
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.
Following is stack trace.
Comment From: spencergibb
Please don't cross post.
Closing in favor of https://stackoverflow.com/questions/58096395/spring-cloud-config-remote-hung-up-unexpectedly
Comment From: shivhg
sorry
Comment From: LastLightSith
Please don't cross post.
Closing in favor of https://stackoverflow.com/questions/58096395/spring-cloud-config-remote-hung-up-unexpectedly
There is no answer there and this is an issue and should be open here