java - 使用 JGit 在 Java 中克隆 repo 时出现 AccessDeniedException
问题描述
我正在以编程方式尝试使用 JGit API 克隆存储库。我正在使用以下代码,但是当我执行它时,出现错误。
我已经尝试了所有可能的解决方案,但我仍然无法解决问题。任何人都可以提供输入吗?
File localPath = File.createTempFile("TestGitRepository", "");
Git result = Git.cloneRepository()
.setURI("https://gitlab.wuintranet.net/fe/wu-content.git")
.setDirectory(localPath)
.call();
“ https://gitlab.wuintranet.net/fe/wu-content.git ”上的仓库应该被克隆,但它抛出了这个错误:
java.nio.file.AccessDeniedException: C:\Program Files\Git\mingw64\etc.probe-e65aa729-82b1-4ff9-8d9b-3a4a7ea3de4a
解决方案
看起来他们在上一个版本中发现了一个错误。“5.3.1.201904271842-r”对我有用。你可以回去。这是详细信息
推荐阅读
- spring-boot - 具有使用 CSRF 保护的预认证过滤器的 Spring Boot 微服务
- sql - 必须声明表变量“@table”。在if条件下,任何人都可以解决?
- python - 从数据库中检索数据并设置为 Kivy 中的文本输入字段和图像小部件,用于多屏应用程序!属性错误
- php - 更新用户的个人资料页面:无法更新数据库中的用户信息
- javascript - 未捕获的 ReferenceError:createProduct 未在 HTMLFormElement.onreset 中定义
- jquery - 使用jquery检查输入类型文本是否包含div中的值
- vba - Microsoft Form - 如果复选框单元格值大于
- google-cloud-functions - 在 Firebase 云功能中通过 nodemailer 发送邮件是否需要计费帐户?
- ios - 侧边菜单边框 Xamarin.iOS
- sql - 如何按字母排序,然后按数字排序?