public class git {
//public static Object textView;
//public static void main(String[] args) throws IOException,GitAPIException
//{
String repoUrl = "https://bitbucket_integration@bitbucket.org/bitbucket_integration/bitbucket_integration.git";
String cloneDirectoryPath = "G:\\tmp\\test1"; // Ex.in windows c:\\gitProjects\SpringBootMongoDbCRUD\
public void cloneRepo(String repoUrl, String cloneDirectoryPath, String User, String password) throws GitAPIException
{
try {
System.out.println("Cloning "+repoUrl+" into "+repoUrl);
Git.cloneRepository()
.setURI(repoUrl)
.setDirectory(Paths.get(cloneDirectoryPath).toFile())
.setCredentialsProvider( new UsernamePasswordCredentialsProvider(User,password ) )
.call();
System.out.println("Completed Cloning");
} catch (GitAPIException e) {
System.out.println("Exception occurred while cloning repo");
e.printStackTrace();
}
}
public static void main(String[] args) throws IOException,GitAPIException
{
}
Hi Nupur, this is a forum regarding Atlassian products. My recommendation for you to increase the chances to get a response, would be to post a more elaborated description with a clear message of what you want to obtain, the steps you followed so far and when is it failing, so users have it easier to understand what's going on and will be more likely to help you.
Also, make sure to include info such as what platform are you using (Server or Cloud), version, which other tools are involved, etc.
If your message is not clear, users will most likely just skip your question and jump to the next one.
Kind regards,
Ana
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.