Class BaseGitProperties
java.lang.Object
org.apereo.cas.configuration.model.support.git.services.BaseGitProperties
- All Implemented Interfaces:
Serializable
,CasFeatureModule
- Direct Known Subclasses:
GitSamlMetadataProperties
,GitServiceRegistryProperties
@RequiresModule(name="cas-server-support-git-core")
public abstract class BaseGitProperties
extends Object
implements CasFeatureModule, Serializable
This is
BaseGitProperties
.- Since:
- 6.1.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The jgit library supports multiple HTTP client implementations.Nested classes/interfaces inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
CasFeatureModule.FeatureCatalog
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe branch to checkout and activate, defaults tomaster
.If the repository is to be cloned, this will allow a select list of branches to be fetched.Directory into which the repository would be cloned.Implementation of HTTP client to use when doing git operations via http/https.Password used to access or push to the repository.Path to the SSH private key identity.Password for the SSH private key.The address of the git repository.As with using SSH with public keys, an SSH session withssh://[email protected]/repo.git
must be specified to use password-secured SSH connections.Timeout for git operations such as push and pull in seconds.Username used to access or push to the repository.boolean
When establishing an ssh session, determine if default identities loaded on the machine should be excluded/removed and identity should only be limited to those loaded from given keys.boolean
Decide whether changes should be pushed back into the remote repository.boolean
isRebase()
Whether to rebase on pulls.boolean
Whether commits should be signed.boolean
Whether on not to turn on strict host key checking.setActiveBranch
(String activeBranch) The branch to checkout and activate, defaults tomaster
.setBranchesToClone
(String branchesToClone) If the repository is to be cloned, this will allow a select list of branches to be fetched.setClearExistingIdentities
(boolean clearExistingIdentities) When establishing an ssh session, determine if default identities loaded on the machine should be excluded/removed and identity should only be limited to those loaded from given keys.setCloneDirectory
(SpringResourceProperties cloneDirectory) Directory into which the repository would be cloned.setHttpClientType
(BaseGitProperties.HttpClientTypes httpClientType) Implementation of HTTP client to use when doing git operations via http/https.setPassword
(String password) Password used to access or push to the repository.setPrivateKey
(SpringResourceProperties privateKey) Path to the SSH private key identity.setPrivateKeyPassphrase
(String privateKeyPassphrase) Password for the SSH private key.setPushChanges
(boolean pushChanges) Decide whether changes should be pushed back into the remote repository.setRebase
(boolean rebase) Whether to rebase on pulls.setRepositoryUrl
(String repositoryUrl) The address of the git repository.setSignCommits
(boolean signCommits) Whether commits should be signed.setSshSessionPassword
(String sshSessionPassword) As with using SSH with public keys, an SSH session withssh://[email protected]/repo.git
must be specified to use password-secured SSH connections.setStrictHostKeyChecking
(boolean strictHostKeyChecking) Whether on not to turn on strict host key checking.setTimeout
(String timeout) Timeout for git operations such as push and pull in seconds.setUsername
(String username) Username used to access or push to the repository.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apereo.cas.configuration.features.CasFeatureModule
isDefined, isUndefined
-
Constructor Details
-
BaseGitProperties
public BaseGitProperties()
-
-
Method Details
-
getRepositoryUrl
The address of the git repository. Could be a URL or a file-system path. -
getActiveBranch
The branch to checkout and activate, defaults tomaster
. -
getBranchesToClone
If the repository is to be cloned, this will allow a select list of branches to be fetched. List the branch names separated by commas or use*
to clone all branches. Defaults to all branches. -
getUsername
Username used to access or push to the repository. -
getPassword
Password used to access or push to the repository. -
isPushChanges
public boolean isPushChanges()Decide whether changes should be pushed back into the remote repository. -
isSignCommits
public boolean isSignCommits()Whether commits should be signed. -
isRebase
public boolean isRebase()Whether to rebase on pulls. -
getPrivateKeyPassphrase
Password for the SSH private key. -
getPrivateKey
Path to the SSH private key identity. Must be a resource that can resolve to an absolute file on disk due to Jsch library needing String path. Classpath resource would work if file on disk rather than inside archive. -
getSshSessionPassword
As with using SSH with public keys, an SSH session withssh://[email protected]/repo.git
must be specified to use password-secured SSH connections. -
isStrictHostKeyChecking
public boolean isStrictHostKeyChecking()Whether on not to turn on strict host key checking. true will be "yes", false will be "no", "ask" not supported. -
isClearExistingIdentities
public boolean isClearExistingIdentities()When establishing an ssh session, determine if default identities loaded on the machine should be excluded/removed and identity should only be limited to those loaded from given keys. -
getTimeout
Timeout for git operations such as push and pull in seconds. -
getCloneDirectory
Directory into which the repository would be cloned. -
getHttpClientType
Implementation of HTTP client to use when doing git operations via http/https. The jgit library sets the connection factory statically (globally) so this property should be set to the same value for all git repositories (services, saml, etc). Not doing so might result in one connection factory being used for clone and another for subsequent fetches. -
setRepositoryUrl
The address of the git repository. Could be a URL or a file-system path.- Returns:
this
.
-
setActiveBranch
The branch to checkout and activate, defaults tomaster
.- Returns:
this
.
-
setBranchesToClone
If the repository is to be cloned, this will allow a select list of branches to be fetched. List the branch names separated by commas or use*
to clone all branches. Defaults to all branches.- Returns:
this
.
-
setUsername
Username used to access or push to the repository.- Returns:
this
.
-
setPassword
Password used to access or push to the repository.- Returns:
this
.
-
setPushChanges
Decide whether changes should be pushed back into the remote repository.- Returns:
this
.
-
setSignCommits
Whether commits should be signed.- Returns:
this
.
-
setRebase
Whether to rebase on pulls.- Returns:
this
.
-
setPrivateKeyPassphrase
Password for the SSH private key.- Returns:
this
.
-
setPrivateKey
Path to the SSH private key identity. Must be a resource that can resolve to an absolute file on disk due to Jsch library needing String path. Classpath resource would work if file on disk rather than inside archive.- Returns:
this
.
-
setSshSessionPassword
As with using SSH with public keys, an SSH session withssh://[email protected]/repo.git
must be specified to use password-secured SSH connections.- Returns:
this
.
-
setStrictHostKeyChecking
Whether on not to turn on strict host key checking. true will be "yes", false will be "no", "ask" not supported.- Returns:
this
.
-
setClearExistingIdentities
When establishing an ssh session, determine if default identities loaded on the machine should be excluded/removed and identity should only be limited to those loaded from given keys.- Returns:
this
.
-
setTimeout
Timeout for git operations such as push and pull in seconds.- Returns:
this
.
-
setCloneDirectory
Directory into which the repository would be cloned.- Returns:
this
.
-
setHttpClientType
Implementation of HTTP client to use when doing git operations via http/https. The jgit library sets the connection factory statically (globally) so this property should be set to the same value for all git repositories (services, saml, etc). Not doing so might result in one connection factory being used for clone and another for subsequent fetches.- Returns:
this
.
-