diff --git a/pom.xml b/pom.xml index 3fe50bec..ae2646f4 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ cx-spring-boot-sdk - 0.5.28 + 0.5.29 cx-spring-boot-sdk diff --git a/src/main/java/com/checkmarx/sdk/utils/CxRepoFileHelper.java b/src/main/java/com/checkmarx/sdk/utils/CxRepoFileHelper.java index b26dffa7..7e18c1d3 100644 --- a/src/main/java/com/checkmarx/sdk/utils/CxRepoFileHelper.java +++ b/src/main/java/com/checkmarx/sdk/utils/CxRepoFileHelper.java @@ -176,14 +176,18 @@ else if (gitURL.contains("@bitbucket.org")) { log.info("credentialsProvider without password"); } log.info("Cloning code locally to {}", pathFile); - Git.cloneRepository() - .setURI(gitURL) - .setBranch(branch) - .setBranchesToClone(Collections.singleton(branch)) - .setDirectory(pathFile) - .setCredentialsProvider(credentialsProvider) - .call() - .close(); + try { + Git.cloneRepository() + .setURI(gitURL) + .setBranch(branch) + .setBranchesToClone(Collections.singleton(branch)) + .setDirectory(pathFile) + .setCredentialsProvider(credentialsProvider) + .call() + .close(); + } catch (GitAPIException e) { + log.error("API Exception : ",e); + } } private void runPostCloneScript(CxScanParams params, String path) {