执行git tfs rcheckin时出现TF26198错误 [英] TF26198 error when doing git tfs rcheckin

查看:283
本文介绍了执行git tfs rcheckin时出现TF26198错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在工作中使用TFS 2010,并且使用git-tfs,因此我可以在本地使用git。我最近升级了我的机器,并复制了所有本地存储库文件夹。



我似乎可以从TFS中提取并在本地提交。但是,当我执行 git tfs rcheckin 时,我现在得到错误:

  TF26198:工作项目不存在,或者您没有权限访问它。 

使用 git tfs checkintool

我推测我得到了这个错误,因为原来的 git tfs clone 是在另一台计算机上完成的。阅读git-tfs文档,这听起来像我应该从我的旧机器(而不是副本)做一个 git clone ,然后一个 git tfs自举。但是,尝试此操作时,我仍然遇到同样的错误。



有什么想法可能会导致此问题?我唯一能想到的另一个区别是,我的旧机器安装了VS2010和VS2012,而我的新机器只安装了VS2012。

解决方案

git-tfs 解析您的提交评论为您的变更集提供工作项目关联。默认情况下,如果输入#1234 ,那么 git-tfs checkin rcheckin 命令将尝试将工作项目1234与签入关联。



如果您使用#1234 在你的提交信息中,以便将它们与一个不同的bug跟踪系统联系起来,这显然是有冲突的。在这种特殊情况下, git-tfs 找不到TFS工作项,并向您提供此消息。



最近开始,您可以提供配置值:

  git-tfs.work-item-regex 

为了覆盖#1234 行为。尽管无法禁用此功能,但您可以将其设置为不太可能与之冲突的内容。例如:

  git-tfs.work-item-regex = TFS工作项目:(?< item_id> \d + )


We use TFS 2010 at work, and I use git-tfs so I can use git locally. I've recently upgraded my machine, and copied all my local repository folders across.

I seem to be able to pull from TFS and commit locally. However when I do git tfs rcheckin, I now get the error:

TF26198: The work item does not exist, or you do not have permission to access it.

It does however work when using git tfs checkintool.

I presumed that I was getting this error because the original git tfs clone was done on another computer. Reading the git-tfs docs, it sounds like I should be doing a git clone from my old machine (rather than copy), then a git tfs bootstrap. However, when trying this, I still get the same error.

Any ideas what could be causing this? The only other difference I can think of is that my old machine has VS2010 and VS2012 installed, whereas my new machine has just VS2012 installed.

解决方案

git-tfs parses your commit comments to provide work item associations with your changesets. By default, if you enter #1234, then the git-tfs checkin and rcheckin commands will attempt to associate work item 1234 with the checkin.

If you are using #1234 in your commit messages in order to associate these with a different bug tracking system, this is obviously in conflict. In this particular case, git-tfs cannot find the TFS work item and is providing you with this message.

As of recently, you can provide a configuration value:

git-tfs.work-item-regex

in order to override the #1234 behavior. While there is no way to disable this functionality, you can set it to something you would be unlikely to conflict with. For example:

git-tfs.work-item-regex=TFS WORK ITEM:(?<item_id>\d+)

这篇关于执行git tfs rcheckin时出现TF26198错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆