如何解决git-tf克隆异常java.lang.UnsatisfiedLinkError
我正在尝试使用git-tf在TFS上克隆TFVC项目。当我运行git-tf clone时,系统提示我输入TFS用户名,输入用户名后,我得到一个java.lang.UnsatisfiedLinkError。 我的目标是将这个项目迁移到Git并将其推送到Gitlab,同时当然还要保持变更集的历史。
命令: git-tf克隆https:// tfs-url / tfs / defaultcollection / $ / TFSProjectName〜/ Desktop / MyTFSProject --deep
完全例外:
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'boolean com.microsoft.tfs.jni.internal.console.NativeConsole.nativeEnableEcho()'
at com.microsoft.tfs.jni.internal.console.NativeConsole.nativeEnableEcho(Native Method)
at com.microsoft.tfs.jni.internal.console.NativeConsole.enableEcho(NativeConsole.java:56)
at com.microsoft.tfs.jni.ConsoleUtils.enableEcho(ConsoleUtils.java:47)
at com.microsoft.gittf.client.clc.commands.framework.Command.prompt(Command.java:510)
at com.microsoft.gittf.client.clc.commands.framework.Command.promptForPassword(Command.java:482)
at com.microsoft.gittf.client.clc.commands.framework.Command.promptForCredentials(Command.java:470)
at com.microsoft.gittf.client.clc.commands.framework.Command.getDefaultCredentials(Command.java:309)
at com.microsoft.gittf.client.clc.commands.framework.Command.getCredentials(Command.java:335)
at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:370)
at com.microsoft.gittf.client.clc.commands.CloneCommand.run(CloneCommand.java:203)
at com.microsoft.gittf.client.clc.Main.main(Main.java:328)
环境:
- 操作系统:MacOS Catalina 10.15.5
- Java :openjdk 11.0.7 2020-04-14
- Git-tf :git-tf版本2.0.3.20131219
解决方法
根据错误消息,此问题的原因是Java版本。
查看有关Git-TF的文档。您可以下载 Java 7 并将其设置为 PATH环境变量。
使用Java 8进行测试,它也可以工作。
另一方面,Git-TF已达到使用寿命。
我的目标是将该项目迁移到Git并将其推送到Gitlab,同时 保持课程变更历史。
我建议您使用Git-tfs来实现。
以下是脚本:
git tfs clone <TFS URL> $/project
cd repo path
git checkout -b TempBranch
git remote add origin <Git URL>
git push --set-upstream origin TempBranch
在这种情况下,TFVC存储库可以更改为Git存储库。然后,您可以使用git push将存储库推送到Gitlab。
它将保留历史记录。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。