From 051fd038b874efbf6abea95228ca8214a5b55213 Mon Sep 17 00:00:00 2001 From: Ryan Baxter <524254+ryanjbaxter@users.noreply.github.com> Date: Thu, 6 Oct 2022 13:34:14 -0400 Subject: [PATCH] Changes to ssh session factory to work on main --- .../config/server/ssh/PropertyBasedSshSessionFactory.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/ssh/PropertyBasedSshSessionFactory.java b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/ssh/PropertyBasedSshSessionFactory.java index 702d8016..662093de 100644 --- a/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/ssh/PropertyBasedSshSessionFactory.java +++ b/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/ssh/PropertyBasedSshSessionFactory.java @@ -231,6 +231,9 @@ public class PropertyBasedSshSessionFactory extends SshdSessionFactory { @Override public ProxyData get(InetSocketAddress remoteAddress) { JGitEnvironmentProperties sshProperties = findEnvironmentProperties(sshKeysByHostname, remoteAddress); + if (sshProperties == null) { + return null; + } ProxyHostProperties proxyHostProperties = sshProperties.getProxy() .get(ProxyHostProperties.ProxyForScheme.HTTP);