Package com.atlassian.bamboo.plugins.git
Class UriUtils
java.lang.Object
com.atlassian.bamboo.plugins.git.UriUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable StringextractUsername(String repositoryUrl) static URIgetUriViaProxy(GitRepositoryAccessData proxyAccessData, ScpAwareUri repositoryUri) static booleanhasScpSyntax(@NotNull String url) static org.eclipse.jgit.transport.URIishnormaliseRepositoryLocation(@Nullable String userName, @Nullable String password, @NotNull org.eclipse.jgit.transport.URIish normalised, boolean shouldAddFakeAuthData) This method adds/removes username and password from URL to avoid interactive password prompts from the git command line clientstatic booleanrequiresSshTransport(@NotNull ScpAwareUri repositoryUri) static booleanrequiresSshTransport(@NotNull String repositoryUrl) static voidvalidateSshUsername(@Nullable String username)
-
Field Details
-
HTTP_SCHEME
- See Also:
-
HTTPS_SCHEME
- See Also:
-
FTP_SCHEME
- See Also:
-
FTPS_SCHEME
- See Also:
-
FILE_SCHEME
- See Also:
-
SSH_PREFIX
- See Also:
-
-
Method Details
-
extractUsername
@Nullable public static @Nullable String extractUsername(String repositoryUrl) throws URISyntaxException - Throws:
URISyntaxException
-
requiresSshTransport
-
requiresSshTransport
-
hasScpSyntax
-
getUriViaProxy
public static URI getUriViaProxy(GitRepositoryAccessData proxyAccessData, ScpAwareUri repositoryUri) throws URISyntaxException - Throws:
URISyntaxException
-
normaliseRepositoryLocation
public static org.eclipse.jgit.transport.URIish normaliseRepositoryLocation(@Nullable @Nullable String userName, @Nullable @Nullable String password, @NotNull @NotNull org.eclipse.jgit.transport.URIish normalised, boolean shouldAddFakeAuthData) This method adds/removes username and password from URL to avoid interactive password prompts from the git command line client -
validateSshUsername
public static void validateSshUsername(@Nullable @Nullable String username) throws RepositoryException - Throws:
RepositoryException
-