我试图使用git-tf来克隆TFS上的TFVC项目。当我运行git克隆时,我会被提示输入我的TFS用户名,在输入用户名后,我会得到一个java.lang.UnsatisfiedLinkError。我的目标是将该项目迁移到Git,并将其推送到Gitlab,同时维护更改集的历史。
命令: git-tf克隆https://tfs-url/tfs/defaultcollection/ $/TFSProjectName ~/Desktop/MyTFSProject --深度
完全例外:
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)环境:
发布于 2020-08-31 07:20:08
从错误消息来看,造成此问题的原因是java版本。
检查一下这个关于吉特-TF的文档。您可以下载Java 7并将其设置为路径环境变量。
用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推送回购到Gitlab。
它也将保留历史。
https://stackoverflow.com/questions/63658888
复制相似问题