Interface GitAuthHelper
public interface GitAuthHelper
Helper for adding authentication configuration to a git command
- Since:
- 6.7
-
Method Summary
Modifier and TypeMethodDescription<T extends GitCommandBuilderSupport<T>>
GitCommandBuilderSupport<T>configure(GitCommandBuilderSupport<T> builder, String username, String password, Path keyFile) Configured the suppliedGitCommandBuilderSupportto make authenticated requests.
-
Method Details
-
configure
@Nonnull <T extends GitCommandBuilderSupport<T>> GitCommandBuilderSupport<T> configure(@Nonnull GitCommandBuilderSupport<T> builder, @Nullable String username, @Nullable String password, @Nullable Path keyFile) Configured the suppliedGitCommandBuilderSupportto make authenticated requests. This will prevent the Git command from prompting for a password. This is useful for making requests to remote repositories.- Parameters:
builder- adds authentication information to this builderusername- username used for authenticationpassword- password used for authenticationkeyFile- path to private key used for authentication- Returns:
- commandBuilder configured with authentication credentials
-