public class GitRepository extends VcsRepository<GitRepository,GitRepositoryProperties>
description, name, oid, parent, project, repositoryViewer, TYPE
Constructor and Description |
---|
GitRepository() |
Modifier and Type | Method and Description |
---|---|
GitRepository |
authentication(@NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)
Selects a previously defined
SharedCredentials to authenticate with git server. |
GitRepository |
authentication(@NotNull SshPrivateKeyAuthentication sshPrivateKeyAuthentication)
Specifies SSH private key authentication.
|
GitRepository |
authentication(@NotNull UserPasswordAuthentication userPasswordAuthentication)
Specifies username/password authentication.
|
GitRepository |
branch(@NotNull String branch)
Sets branch to check out.
|
protected GitRepositoryProperties |
build() |
GitRepository |
changeDetection(@NotNull VcsChangeDetection vcsChangeDetection)
Sets change detection options for this repository.
|
GitRepository |
commandTimeout(Duration commandTimeout)
Specifies how much time is given for git commands to finish.
|
GitRepository |
commandTimeoutInMinutes(int commandTimeoutMinutes)
Specifies how much time in minutes is given for git commands to finish.
|
GitRepository |
defaultChangeDetection()
Resets all change detection options to defaults.
|
GitRepository |
fetchWholeRepository(boolean fetchWholeRepository)
Enforces (or not) fetching all remote refs from the repository rather than single branch.
|
GitRepository |
lfsEnabled(boolean useLfs)
Enables/disables git lfs support.
|
GitRepository |
remoteAgentCacheEnabled(boolean useRemoteAgentCache)
Enables/disables caching repository content on the remote and elastic agents.
|
GitRepository |
shallowClonesEnabled(boolean useShallowClones)
Enables/disables shallow clones when checking out from the repository.
|
GitRepository |
sshKeyAppliesToSubmodules(boolean sshKeyAppliesToSubmodules)
Enables/disabled authenticating to submodules with SSH key configured for this repository.
|
GitRepository |
submodulesEnabled(boolean useSubmodules)
Enables/disables submodule support.
|
GitRepository |
url(@NotNull String url)
Sets git repository url.
|
GitRepository |
verboseLogs(boolean verboseLogs)
Enables/disables verbose logs from git commands.
|
GitRepository |
withoutAuthentication()
Removes authentication details.
|
description, getIdentifier, getName, getOid, humanReadableId, humanReadableType, name, oid, oid, parent, project, repositoryViewer
public GitRepository url(@NotNull @NotNull String url)
url
- repository urlpublic GitRepository branch(@NotNull @NotNull String branch)
public GitRepository withoutAuthentication()
public GitRepository authentication(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentialsIdentifier)
SharedCredentials
to authenticate with git server. Currently SSH and username/password credentials are supported.public GitRepository authentication(@NotNull @NotNull UserPasswordAuthentication userPasswordAuthentication)
public GitRepository authentication(@NotNull @NotNull SshPrivateKeyAuthentication sshPrivateKeyAuthentication)
public GitRepository shallowClonesEnabled(boolean useShallowClones)
public GitRepository submodulesEnabled(boolean useSubmodules)
public GitRepository sshKeyAppliesToSubmodules(boolean sshKeyAppliesToSubmodules)
public GitRepository remoteAgentCacheEnabled(boolean useRemoteAgentCache)
public GitRepository commandTimeout(Duration commandTimeout)
public GitRepository commandTimeoutInMinutes(int commandTimeoutMinutes)
public GitRepository verboseLogs(boolean verboseLogs)
public GitRepository fetchWholeRepository(boolean fetchWholeRepository)
public GitRepository lfsEnabled(boolean useLfs)
public GitRepository defaultChangeDetection()
public GitRepository changeDetection(@NotNull @NotNull VcsChangeDetection vcsChangeDetection)
VcsChangeDetection
protected GitRepositoryProperties build()
build
in class VcsRepository<GitRepository,GitRepositoryProperties>
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.