public static class PushCommandParameters.Builder extends BuilderSupport
NOT_BLANK
Constructor and Description |
---|
Builder(PushCommandParameters pushCommandParameters) |
Builder(String remoteUrl) |
Modifier and Type | Method and Description |
---|---|
PushCommandParameters.Builder |
anonymous(boolean value)
If no credentials are to be provided, set this to
true . |
PushCommandParameters |
build() |
PushCommandParameters.Builder |
force(boolean value)
Specifies whether to supply
--force to force updates to remote refs. |
PushCommandParameters.Builder |
includePrivateRefs(boolean value)
If an explicit refspec is set then this setting is ignored.
|
PushCommandParameters.Builder |
password(String value) |
PushCommandParameters.Builder |
privateKey(File value) |
PushCommandParameters.Builder |
privateKey(Path value) |
PushCommandParameters.Builder |
prune(boolean value)
Specifies whether to supply
--prune to prune remote branches and tags where the local branch
or tag has been deleted. |
PushCommandParameters.Builder |
refspecs(Iterable<String> values) |
PushCommandParameters.Builder |
username(String value) |
PushCommandParameters.Builder |
withEnvironment(String name,
String value)
Puts the provided
value in the environment map with the specified name , after ensuring
both the name and value are not blank. |
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
public Builder(@Nonnull PushCommandParameters pushCommandParameters)
pushCommandParameters
- to copy@Nonnull public PushCommandParameters.Builder anonymous(boolean value)
true
. If no credentials are provided, and anonymous
is not set to true
, then an IllegalArgumentException
will be thrown.
Similarly, if credentials are provided, but anonymous is set to true
then an
IllegalArgumentException
will be thrown.value
- whether or not the push command should provide credentialsthis
@Nonnull public PushCommandParameters build()
@Nonnull public PushCommandParameters.Builder force(boolean value)
--force
to force updates to remote refs. Defaults to false
.value
- whether or not the push command should be forcedthis
@Nonnull public PushCommandParameters.Builder includePrivateRefs(boolean value)
value
- whether to include private refs (outside refs/heads and refs/tags) in the push. The default
value is true so all refs will be pushed.this
@Nonnull public PushCommandParameters.Builder password(@Nonnull String value)
value
- the password to usethis
@Nonnull public PushCommandParameters.Builder privateKey(@Nonnull File value)
value
- the SSH private key to use for authenticationthis
@Nonnull public PushCommandParameters.Builder privateKey(@Nonnull Path value)
value
- the SSH private key to use for authenticationthis
@Nonnull public PushCommandParameters.Builder prune(boolean value)
--prune
to prune remote branches and tags where the local branch
or tag has been deleted.value
- true if pruning should be enabled@Nonnull public PushCommandParameters.Builder refspecs(@Nonnull Iterable<String> values)
values
- refspecs to be passed to the push command@Nonnull public PushCommandParameters.Builder username(@Nonnull String value)
value
- the username to usethis
@Nonnull public PushCommandParameters.Builder withEnvironment(@Nonnull String name, @Nonnull String value)
value
in the environment
map with the specified name
, after ensuring
both the name
and value
are not blank.name
- the name of the environment variable to setvalue
- the value to set for the environment variableCopyright © 2021 Atlassian. All rights reserved.
View cookie preferences