public class GitUtilities extends Object
Constructor and Description |
---|
GitUtilities() |
Modifier and Type | Method and Description |
---|---|
static boolean |
addRemote(org.eclipse.jgit.lib.Repository repository,
String remoteUrl)
Adds the remote repository at remoteUrl to the given local repository
|
static org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider |
createCredentialsProvider(org.wso2.carbon.deployment.synchronizer.RepositoryManager repositoryManager,
int tenantId)
Creates and return a UsernamePasswordCredentialsProvider instance for a tenant
|
static void |
InitGitRepository(File gitRepoDir)
Initialize local git repository
|
static boolean |
isValidGitRepo(org.eclipse.jgit.lib.Repository repository)
Checks if an existing local repository is a valid git repository
|
public static boolean isValidGitRepo(org.eclipse.jgit.lib.Repository repository)
repository
- Repository instancepublic static org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider createCredentialsProvider(org.wso2.carbon.deployment.synchronizer.RepositoryManager repositoryManager, int tenantId)
tenantId
- tenant IdrepositoryManager
- RepositoryManager instancepublic static void InitGitRepository(File gitRepoDir)
gitRepoDir
- directory in the local file systempublic static boolean addRemote(org.eclipse.jgit.lib.Repository repository, String remoteUrl)
repository
- Repository instance representing local reporemoteUrl
- remote repository urlCopyright © 2017 WSO2. All rights reserved.