当我们使用TFS2015d的生成代理时,我们将生成定义加入代理池队列中,但是代理可能无法完全下载我们在TFS代码浏览器中看到的所有目录,这肯定会导致编译失败呀!为什么呢?

原因在于tfscompile这个账号在某个项目的版本控制中,对某个源码目录没有权限

但是不可能啊,我们已经在根节点上给了权限了呀,

是的,你的确给了根目录所有权限,但是仔细观察你会发现,有个关于继承的隐藏开关

如果某个目录勾选了“关闭”,那么这个目录对TFSCOMPILE账号就无权访问,当然生成代理就无法下载咯。

因此,我们还是仔细点,挨个目录检查一遍。

当然,其实这个功能是有用的,比如我就是想让TFSCOMPILE不下载某个目录(比如branchs等)。

下面是老外对这个问题的解释和解决方案

I would like to share with you my last struggle with TFS. I received a call from a colleague about some problem with the ‘new’ TFS build. Initially I tough it is only a miss-configuration and that the solution will be trivial, but as you can imagine, it wasn’t.

The problem lied in the fact that build agent couldn’t retrieve the sources and the error message was not treated as such. You could only see logged a (workspace version -1) inside the Get Sources step, after stating that syncing the repository was done.

As a first thing, I tough about agent not having sufficient rights to retrieve the source code. After a quick check and making sure that the agent service user has sufficient rights to retrieve the code, I run my build again and I got the same result. Didn’t helped.

Next thing I checked all sort of settings, running the build on a different build agent on different server, running the agent under different account, making sure that permissions for the _work folder are setup correctly, all sort of things. I ended up realizing that if I moved the code from that Team project to another team project, suddenly my build agent was able to retrieve the code again. There where two things, or the project was corrupted or there where some security issues. Thanks to the Microsoft support assistance, I managed to get to the right solution. And guess what? It was a security issue.

For an unknown reason the permission inheritance was disabled on the folder that contained all of the interested branches.

By enabling this setting, I saw that there is a small change in the way build agents are authenticated against TFVC. XAML build agent identifies itself with the user that agent runs under. 2015 build agent in the other hand, uses a Project Collection Build Service group to do so. It is added automatically to the source code permissions tree, and in order to propagate it needs to have the permission inheritance switched on or you need to manually set rights for that user group.

Same goes for the owner of the local workspace created by the agent.

You can change those settings by editing the security for a give item in the source control.

Once this is done, you should see your build agent syncing the sources correctly.

Hi Adam, that’s exactly what I do mention in the post. Also in yesterdays post on MSDN ALM Blog (http://blogs.msdn.com/b/visualstudioalm/archive/2016/01/07/receive-an-error-when-resolving-a-bug-created-by-your-build.aspx) they do mention the same: new build system uses a service account. That service account should be automatically inherited, and in case the inheritance is set to off, it doesn’t happen. You can have inheritance set to off and still make it work by manually adding the above mentioned account and granting the necessary rights.

TFS 2015 Build Agent failing syncing the repository 获取源码 不全 失败的更多相关文章

  1. 搭建TFS 2015 Build Agent环境(一)

    Download the build agent Downloading the build agent is really simple. Navigate to your TFS control ...

  2. 搭建TFS 2015 Build Agent环境(四)

    在通过TFS做DI时,我们经常用到FTP文件上传.TFS发布中,提供了cURL上载文件功能.要想使用此功能,请参考下面步骤启用: 1.登录BuildAgent所在的机器 2.打开cmd(以管理员权限运 ...

  3. 搭建TFS 2015 Build Agent环境(三)

    在配置时,一定要注意下面的几个地方: 1.项目集合生成服务账号 中一定要包含: 2.Build Agent机器上防止Agent的路径一定要短,不要出现特殊字符,比如:C:\Agent 3.一定要安装V ...

  4. 搭建TFS 2015 Build Agent环境(二)

    在执行和安装配置的过程中,注意一定要使用管理员权限运行:ConfigureAgent.cmd 和RunAgent.cmd.配置的过程中,要注意几个内容:1.TFS地址不要写DefaultCollect ...

  5. 瞎折腾之 NHibernate ORM框架的接触(MVC + Repository源码)(一)

    在这炮火连天.技术更新迅猛的年代,不接触了解.甚至会用2~3种框架都不好意思说自己有多少年工作经验.况且出去面试也会有点吹牛的底子嘛. 这次折腾了NHibernate.其实这些ORM框架封装好了都是给 ...

  6. 浅谈 qmake 之 shadow build(将源码路径和构建路径分开,一套源码要分别用msvc2008、msvc2008、mingw分别编译又不互相干扰)

    shadow build shadow build 是什么东西?就是将源码路径和构建路径分开(也就是生成的makefile文件和其他产物都不放到源码路径),以此来保证源码路径的清洁. 这不是qmake ...

  7. TFS: 解决The build agent error - the session for this agent already exists

    来源:http://ericphan.net/blog/2016/6/10/solving-the-tfs-build-agent-error-the-session-for-this-agent-a ...

  8. #VSTS 日志# TFS 2015 Update 1 发布 – Git和TFVC代码库可以混合使用了

    Visual Studio Team Foundation Server 2015 Update 1已经发布了. 这是 Team Foundation Server (TFS) 的最新版本,是 Mic ...

  9. How to Build Office Developer Tools Projects with TFS Team Build 2012

    Introduction Microsoft Visual Studio 2012 provides a new set of tools for developing apps for Office ...

随机推荐

  1. imperva 更改agent的注册密码

    imperva agent 在注册到网关的时候显示账号密码错误 如下图 这是一个数据库审计的设备由于当初最开始实施的时候并不是我安装的,所以账号密码我也不清楚,客户留的账号密码也不确定.因此导致账号密 ...

  2. linux设备驱动归纳总结(三):3面向对象思想和lseek、container_of、write、read 【转】

    linux设备驱动归纳总结(三):3.设备驱动面向对象思想和lseek的实现 转自:http://blog.chinaunix.net/uid-25014876-id-59418.html 一.结构体 ...

  3. centos7下安装配置redis3.0.4

    安装redis 1.进入redis官网(redis.io)下载redis稳定版安装包,目前稳定版本为3.0.4 2.在linux  /usr文件夹下新建redis文件夹,拷贝安装包redis-3.0. ...

  4. centos6.5安装maridb5.5.51

    1.先创建关于mariadb的yum源 vi /etc/yum.repos.d/MariaDB.repo [mariadb] name = MariaDB baseurl = http://yum.m ...

  5. C# Message类的属性Msg所关联的消息ID

    C# Message类的属性Msg所关联的消息ID   https://msdn.microsoft.com/en-us/library/windows/desktop/ms645606(v=vs.8 ...

  6. Error:The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location:

    在Android studio 或者intellij idea中新创建一个项目或者打开一个存在的项目时,有时候会出现Error:The supplied javaHome seems to be in ...

  7. Windows下SVN服务器搭建方法整理(apache)

    http://skydream.iteye.com/blog/437959 http://www.cnblogs.com/liuke209/archive/2009/09/23/1572858.htm ...

  8. maven windows 环境变量

    MAVEN_HOME,内容是解压的maven文件路径 Path中添加 %MAVEN_HOME%\bin 为了测试安装成功,打开命令提示符,输入 mvn -version

  9. 【LeetCode】167. Two Sum II - Input array is sorted

    Difficulty:easy  More:[目录]LeetCode Java实现 Description Given an array of integers that is already sor ...

  10. 001 jquery对象与dom对象的转换

    1.jQuery对象介绍 2.jQuery对象转换为Dom对象 3.Dom转换为Jquery对象 4.将jquery转换为Dom程序 <!DOCTYPE html> <html> ...