public class JGitSshConfig
extends java.lang.Object
implements org.apache.sshd.client.config.hosts.HostConfigEntryResolver
HostConfigEntryResolver adapted specifically for JGit.
We use our own config file parser and entry resolution since the default
ConfigFileHostEntryResolver has a number of problems:
OpenSshConfigFile.| Modifier and Type | Field and Description |
|---|---|
private OpenSshConfigFile |
configFile |
| Constructor and Description |
|---|
JGitSshConfig(java.io.File home,
java.io.File config,
java.lang.String localUserName)
Creates a new
OpenSshConfigFile that will read the config from
file config use the given file home as "home" directory. |
| Modifier and Type | Method and Description |
|---|---|
org.apache.sshd.client.config.hosts.HostConfigEntry |
resolveEffectiveHost(java.lang.String host,
int port,
java.net.SocketAddress localAddress,
java.lang.String username,
org.apache.sshd.common.AttributeRepository attributes) |
private OpenSshConfigFile configFile
public JGitSshConfig(@NonNull java.io.File home, @NonNull java.io.File config, @NonNull java.lang.String localUserName)
OpenSshConfigFile that will read the config from
file config use the given file home as "home" directory.home - user's home directory for the purpose of ~ replacementconfig - file to load.localUserName - user name of the current user on the local host OSpublic org.apache.sshd.client.config.hosts.HostConfigEntry resolveEffectiveHost(java.lang.String host,
int port,
java.net.SocketAddress localAddress,
java.lang.String username,
org.apache.sshd.common.AttributeRepository attributes)
throws java.io.IOException
resolveEffectiveHost in interface org.apache.sshd.client.config.hosts.HostConfigEntryResolverjava.io.IOException