package org.dstadler.jgit.porcelain;
import java.io.File;
import java.io.IOException;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.GitAPIException;
<BUG>import org.eclipse.jgit.api.errors.InvalidRemoteException;
import org.eclipse.jgit.api.errors.TransportException;</BUG>
public class CloneRemoteRepository {
private static final String REMOTE_URL = "https://github.com/github/testrepo.git";
<BUG>public static void main(String[] args) throws IOException, InvalidRemoteException, TransportException, GitAPIException {
File localPath = File.createTempFile("TestGitRepository", "");
localPath.delete();

System.out.println("Cloning from " + REMOTE_URL + " to " + localPath);</BUG>
try (Git result = Git.cloneRepository()

package org.dstadler.jgit.porcelain;
import java.io.File;
import java.io.IOException;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.GitAPIException;
public class CloneRemoteRepository {
private static final String REMOTE_URL = "https://github.com/github/testrepo.git";
public static void main(String[] args) throws IOException, GitAPIException {
File localPath = File.createTempFile("TestGitRepository", "");
if(!localPath.delete()) {
throw new IOException("Could not delete temporary file " + localPath);
}
System.out.println("Cloning from " + REMOTE_URL + " to " + localPath);
try (Git result = Git.cloneRepository()
