code: public CredentialsProvider createFor(String uri, String username, String password,
  			String passphrase, boolean skipSslValidation) {
  		CredentialsProvider provider = null;
  		if (awsAvailable() && AwsCodeCommitCredentialProvider.canHandle(uri)) {
  			this.logger
  					.debug("Constructing AwsCodeCommitCredentialProvider for URI " + uri);
  			AwsCodeCommitCredentialProvider aws = new AwsCodeCommitCredentialProvider();
  			aws.setUsername(username);
  			aws.setPassword(password);
  			provider = aws;
  		}
  		else if (hasText(username)) {
  			this.logger.debug(
  					"Constructing UsernamePasswordCredentialsProvider for URI " + uri);
  			provider = new UsernamePasswordCredentialsProvider(username,
  					password.toCharArray());
  		}
  		else if (hasText(passphrase)) {
  			this.logger
  					.debug("Constructing PassphraseCredentialsProvider for URI " + uri);
  			provider = new PassphraseCredentialsProvider(passphrase);
  		}
  
  		if (skipSslValidation && GitSkipSslValidationCredentialsProvider.canHandle(uri)) {
  			this.logger
  					.debug("Constructing GitSkipSslValidationCredentialsProvider for URI "
  							+ uri);
  			provider = new GitSkipSslValidationCredentialsProvider(provider);
  		}
  
  		if (provider == null) {
  			this.logger.debug("No credentials provider required for URI " + uri);
  		}
  
  		return provider;
  	}
docs: 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.
  @param uri the URI of the repository (cannot be null)
  @param username the username provided for the repository (may be null)
  @param password the password provided for the repository (may be null)
  @param passphrase the passphrase to unlock the ssh private key (may be null)
  @param skipSslValidation whether to skip SSL validation when connecting via HTTPS
  @return the first matched credentials provider or the default or null.