【问题标题】:git-tfs clone error: path contains more than the allowed 259 charactersgit-tfs 克隆错误:路径包含超过允许的 259 个字符
【发布时间】:2018-11-28 05:41:02
【问题描述】:

当尝试从 VSTS 中托管的 TFVC 存储库执行 git-tfs 克隆时,我收到以下错误,导致我的克隆操作中止。

我真的不想弄乱我客户的代码库。

如何解决此错误并让克隆操作正常工作?

error: a problem occurred when trying to clone the repository. Try to solve the problem described below. 
In any case, after, try to continue using command `git tfs fetch`
One or more errors occurred. 
TF400889: The following path contains more than the allowed 259 characters: 
C:\code\client1\foo\.git\~w\Releases\7.2.1234.56024_U1_2017-10-09T10.21.44\Projects\FD072_FooBarIntegration\FooProConnectivity\Service References\FooProBIDataService\FooProConnectivity.FooProBIDataService.ReportListResponse.datasource.  
Specify a shorter path.

【问题讨论】:

  • 将磁盘上的存储库向上移动几级,朝向根目录。如果您处于最高级别,那您就不走运了。
  • 好主意!谢谢!我在根目录创建了一个单字母文件夹,这样可以节省 24 个字符。所以,如果我仍然遇到这种情况,我有什么办法吗?这是否意味着无法克隆此存储库?我想我可以将一个驱动器映射到一个文件夹以再回收一个字符,但这并没有为我节省多少。

标签: git tfs azure-devops tfvc git-tfs


【解决方案1】:

我添加了“--workspace”选项来管理这种情况,您将获得更多字符(您可以设置“c:\w”),这应该可以解决您的问题。

https://github.com/git-tfs/git-tfs/blob/master/doc/commands/clone.md#set-a-custom-tfs-workspace-directory

那么,如果我仍然遇到这种情况,我无能为力吗?

当时,.Net 框架中没有长路径支持(除了使用 win32 api 很痛苦,不值得努力)。

现在,最近的框架有一个新的长路径支持,但应该有人进行开发并提出拉取请求来解决这个问题......

【讨论】:

  • 我将它设置为一个字母的目录,并为我修复了它。谢谢!
  • 是否有公开票可以进行此修复?如果没有,我可以创建它。
猜你喜欢
  • 1970-01-01
  • 2017-08-10
  • 1970-01-01
  • 2017-05-18
  • 2012-02-28
  • 2016-08-30
  • 2020-02-07
  • 1970-01-01
  • 2012-06-18
相关资源
最近更新 更多