Class GitCredentialsProviderFactory
- java.lang.Object
-
- org.springframework.cloud.config.server.support.GitCredentialsProviderFactory
-
public class GitCredentialsProviderFactory extends Object
A CredentialsProvider factory for Git repositories. Can handle AWS CodeCommit repositories and other repositories with username/password.- Author:
- Don Laidlaw, Gareth Clay
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanawsCodeCommitEnabledEnable the AWS Code Commit credentials provider for Git URI's that match the AWS Code Commit pattern of https://git-codecommit.${AWS_REGION}.amazonaws.com/${repoPath}.protected org.apache.commons.logging.Loglogger
-
Constructor Summary
Constructors Constructor Description GitCredentialsProviderFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.eclipse.jgit.transport.CredentialsProvidercreateFor(String uri, String username, String password, String passphrase)Deprecated.in favour ofcreateFor(String, String, String, String, boolean)org.eclipse.jgit.transport.CredentialsProvidercreateFor(String uri, String username, String password, String passphrase, boolean skipSslValidation)Search for a credential provider that will handle the specified URI.booleanisAwsCodeCommitEnabled()voidsetAwsCodeCommitEnabled(boolean awsCodeCommitEnabled)
-
-
-
Field Detail
-
logger
protected org.apache.commons.logging.Log logger
-
awsCodeCommitEnabled
protected boolean awsCodeCommitEnabled
Enable the AWS Code Commit credentials provider for Git URI's that match the AWS Code Commit pattern of https://git-codecommit.${AWS_REGION}.amazonaws.com/${repoPath}. Enabled by default.
-
-
Method Detail
-
createFor
@Deprecated public org.eclipse.jgit.transport.CredentialsProvider createFor(String uri, String username, String password, String passphrase)
Deprecated.in favour ofcreateFor(String, String, String, String, boolean)Search for a credential provider that will handle the specified URI. If not found, and the username or passphrase has text, then create a default using the provided username and password or passphrase. Otherwise null.- Parameters:
uri- the URI of the repository (cannot be null)username- the username provided for the repository (may be null)password- the password provided for the repository (may be null)passphrase- the passphrase to unlock the ssh private key (may be null)- Returns:
- the first matched credentials provider or the default or null.
-
createFor
public org.eclipse.jgit.transport.CredentialsProvider createFor(String uri, String username, String password, String passphrase, boolean skipSslValidation)
Search for a credential provider that will handle the specified URI. If not found, and the username or passphrase has text, then create a default using the provided username and password or passphrase. If skipSslValidation is true and the URI has an https scheme, the default credential provider's behaviour is modified to suppress any SSL validation errors that occur when communicating via the URI. Otherwise null.- Parameters:
uri- the URI of the repository (cannot be null)username- the username provided for the repository (may be null)password- the password provided for the repository (may be null)passphrase- the passphrase to unlock the ssh private key (may be null)skipSslValidation- whether to skip SSL validation when connecting via HTTPS- Returns:
- the first matched credentials provider or the default or null.
-
isAwsCodeCommitEnabled
public boolean isAwsCodeCommitEnabled()
- Returns:
- the awsCodeCommitEnabled
-
setAwsCodeCommitEnabled
public void setAwsCodeCommitEnabled(boolean awsCodeCommitEnabled)
- Parameters:
awsCodeCommitEnabled- the awsCodeCommitEnabled to set
-
-