Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Jgit clone repository(UnsupportedCredentialItem problem)
Jgit clone repository [message #767281] Sat, 17 December 2011 09:37
marek.kratky is currently offline marek.kratky
Messages: 1
Registered: December 2011
Junior Member
I'm trying to clone Git repository with JGit and I have problem with UnsupportedCredentialItem.

My code:

FileRepositoryBuilder builder = new FileRepositoryBuilder();
Repository repository = builder.setGitDir(PATH).readEnvironment().findGitDir().build();

Git git = new Git(repository);              
CloneCommand clone = git.cloneRepository();
clone.setBare(false);
clone.setCloneAllBranches(true);
clone.setDirectory(PATH).setURI(url);
UsernamePasswordCredentialsProvider user = new UsernamePasswordCredentialsProvider(login, password);                
clone.setCredentialsProvider(user);
clone.call();   


It will occur Exception:

 org.eclipse.jgit.errors.UnsupportedCredentialItem: ssh://git@github.com:22: Passphrase for C:\Users\Marek\.ssh\id_rsa at
 org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider.get(UsernamePasswordCredentialsProvider.java:110)....


But if I delete file known_hosts in .ssh\ It will occur different Exception

org.eclipse.jgit.errors.UnsupportedCredentialItem: ssh://git@github.com:22: The authenticity of host 'github.com' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting?
at org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider.get(UsernamePasswordCredentialsProvider.java:110)....


Is there any possibility to type "yes" to that question or just skip it?

Thank you!
Previous Topic:Converting cloned project to a Java project
Next Topic:Git Repositories View is empty
Goto Forum:
  


Current Time: Mon Jul 28 02:32:58 EDT 2014

Powered by FUDForum. Page generated in 0.01616 seconds