In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

This Server has been upgraded to GitLab release 14.2.6

Commit 8c3f8737 authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Catch load known hosts IO exception

parent 9e16c724
Pipeline #7327 failed with stages
in 1 minute and 25 seconds
......@@ -20,6 +20,7 @@ package org.memobase
import java.io.Closeable
import java.io.File
import java.io.IOException
import java.net.ConnectException
import java.net.UnknownHostException
import java.util.Properties
......@@ -39,7 +40,11 @@ class SftpClient(sftpSettings: Properties) : Closeable {
private val instance: SFTPClient
init {
try {
// ssh.loadKnownHosts()
try {
ssh.loadKnownHosts()
} catch (ex: IOException) {
log.warn(ex.message)
}
ssh.addHostKeyVerifier(sftpSettings.getProperty("fingerprint"))
ssh.connect(sftpSettings.getProperty("host"))
ssh.authPassword(sftpSettings.getProperty("user"), sftpSettings.getProperty("password"))
......
sftp:
host: sftp-test-env
host: swissbib/sftp-test-env
port: 22
user: user
password: password
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment