从位于networkshare的外部GIT仓库构建

时间:2016-06-16 08:21:45

标签: tfs2015

我在TFS2015 Update2下创建服务连接时遇到问题。 我有位于服务器的GIT远程REPO,我通过网络共享文件夹以这种格式访问它:

\\server\GIT_REPOS\GIT_REPO_TO_BUILD_FROM\

我尝试在TFS配置下添加新的External GIT REPO Connection,如下所示:

Connection name: Git repo
Server url: \\server\GIT_REPOS\GIT_REPO_TO_BUILD_FROM\
UserName: domain\username
Password: userPassword

当我尝试排队新版本时,我收到此错误:

Failed to resolve path 'file://server/GIT_REPOS/GIT_REPO_TO_BUILD_FROM/': The filename, directory name, or volume label syntax is incorrect.
Prepare repository failed with exception.

知道某人如何使用网络共享REPO的正确方法?

非常感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

根据网站https://git-scm.com/book/ch4-1.html,Git支持本地协议,可以使用存储库的路径作为URL,但在TFS构建中,不支持本地路径(我得到了与您相同的错误)。

作为替代方案,您需要将repo发布到服务器。同时,您可以考虑在网站https://visualstudio.uservoice.com/forums/121579-visual-studio-2015上提交UserVoice,以指定支持本地git的要求。