JGit API를 사용하여 기존 원격 자식 저장소를 복제하려고하면 아래 오류가 발생합니다.SSL을 건너 뛰는 방법 원격 저장소를 복제하는 동안 JGit을 사용하여 확인 하시겠습니까?
예외 : org.eclipse.jgit.api.errors.TransportException : http://[email protected]:7990/scm/cp/myrepo.githttps://[email protected]:7990/scm/cp/myrepo.git에 보안 연결 때문에 나는를 복제하는 데 사용 나는 아래의 방법을
내 수업에서SSL의 문제에 stablished 수 없습니다 저장소. 나는 아래의 명령을 사용하여이 문제를 해결할 수 있습니다 알고
public static void cloneRepoTemp(String cloneRepoUrl, String username, String password)
throws FileNotFoundException, IOException {
Git git;
try {
git = Git.cloneRepository().setURI(cloneRepoUrl)
.setCredentialsProvider(new UsernamePasswordCredentialsProvider(username, password))
.setDirectory(new File("C:/temp/testrepo")).setBranch("integration").call();
git.close();
} catch (GitAPIException e) {
System.out.println("Exception:" + e);
}
,
git config --global http.sslVerify false
하지만, 내가 JGit API를 사용하고 있기 때문에 내가 사용하려는 그 API를 자체보다는 설정이 명시 적으로 만들기를 통해 호스트 컴퓨터에서. 또한 라이브러리를 여러 컴퓨터에 배포 할 계획이므로 사용자 코드가 변경되도록 사용자의 컴퓨터를 변경하지 마십시오.
git 구성 파일에 항목을 추가하지 않고 코드에서이를 수행 할 수있는 방법이 있습니까?
가능한 복제 (HTTPS를 구성 클래스를 보라 : //stackoverflow.com/questions/33998477/set-ssl-verification-off-for-jgit-clone-command) –