Class GitCredentialsProviderFactory
java.lang.Object
org.springframework.cloud.config.server.support.GitCredentialsProviderFactory
A CredentialsProvider factory for Git repositories. Can handle AWS CodeCommit
repositories and other repositories with username/password.
- Author:
- Don Laidlaw, Gareth Clay
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
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}.protected org.apache.commons.logging.Log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jgit.transport.CredentialsProvider
Deprecated.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.boolean
void
setAwsCodeCommitEnabled
(boolean awsCodeCommitEnabled)
-
Field Details
-
logger
protected org.apache.commons.logging.Log logger -
awsCodeCommitEnabled
protected boolean awsCodeCommitEnabledEnable 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.
-
-
Constructor Details
-
GitCredentialsProviderFactory
public GitCredentialsProviderFactory()
-
-
Method Details
-
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
-
createFor(String, String, String, String, boolean)