Package org.eclipse.jgit.transport
Interface SshConfigStore
-
- All Known Implementing Classes:
OpenSshConfigFile
public interface SshConfigStoreAn abstraction for a SSH config storage, like the OpenSSH ~/.ssh/config file.- Since:
- 5.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceSshConfigStore.HostConfigA host entry from the ssh config.
-
Field Summary
Fields Modifier and Type Field Description static SshConfigStore.HostConfigEMPTY_CONFIGAn emptySshConfigStore.HostConfig.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SshConfigStore.HostConfiglookup(String hostName, int port, String userName)Locate the configuration for a specific host request.SshConfigStore.HostConfiglookupDefault(String hostName, int port, String userName)Locate the configuration for a specific host request and if the configuration has no values forSshConstants.HOST_NAME,SshConstants.PORT,SshConstants.USER, orSshConstants.CONNECTION_ATTEMPTS, fill those values with defaults from the arguments: ssh config key value from argumentHostNamehostNamePortport > 0 ? port : 22UseruserNameConnectionAttempts1
-
-
-
Field Detail
-
EMPTY_CONFIG
static final SshConfigStore.HostConfig EMPTY_CONFIG
An emptySshConfigStore.HostConfig.
-
-
Method Detail
-
lookup
@NonNull SshConfigStore.HostConfig lookup(@NonNull String hostName, int port, String userName)
Locate the configuration for a specific host request.- Parameters:
hostName- to look upport- the user supplied; <= 0 if noneuserName- the user supplied, may benullor empty if none given- Returns:
- the configuration for the requested name.
-
lookupDefault
@NonNull SshConfigStore.HostConfig lookupDefault(@NonNull String hostName, int port, String userName)
Locate the configuration for a specific host request and if the configuration has no values forSshConstants.HOST_NAME,SshConstants.PORT,SshConstants.USER, orSshConstants.CONNECTION_ATTEMPTS, fill those values with defaults from the arguments:ssh config key value from argument HostNamehostNamePortport > 0 ? port : 22UseruserNameConnectionAttempts1- Parameters:
hostName- host name to look upport- port number; <= 0 if noneuserName- the user name, may benullor empty if none given- Returns:
- the configuration for the requested name.
- Since:
- 6.0
-
-