在 VSTF 构建中查看 git-lfs 文件 [英] Check out git-lfs files on VSTF build

查看:44
本文介绍了在 VSTF 构建中查看 git-lfs 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个托管在 VSTS 上的存储库,其中包含一个通过 git-lfs 存储的文件.如果我只是让 VSTS 构建签出存储库,它只会下载包含文件 ID 的 git-lfs 元数据文件.

I've a repository hosted on VSTS, containig a file stored through git-lfs. If I just let VSTS build checkout the repository it just downloads the git-lfs metadata file containing the ID of the file.

以下是 VSTS 获取源代码的输出:

Here's the output how VSTS gets its source:

Syncing repository: MyRepo (Git)
Checking out c84ef2f2bbad4fa3dc70dbd4100534390b9c8f18 to d:work73s
Checked out branch refs/heads/develop for repository MyRepo at commit c84ef2f2bbad4fa3dc70dbd4100534390b9c8f18

我需要怎么做才能检出真实文件?

What do I need to do to checkout the real file?

我假设我需要在 VSTS 检出源代码后手动调用 git lfs fetch.但是在这种情况下我如何处理身份验证(VSTS 要求)?

I assume I need to manually call git lfs fetch after VSTS checked out the source. But how can I handle authentication (which is required by VSTS) in this case?

推荐答案

流程再次更新(2017 年 3 月).这次您需要编辑构建定义的获取源"部分.启用右上角的高级设置"选项并选中从 LFS 检出文件"选项.

The process has been updated yet again (March 2017). This time you need to edit the "Get Sources" part of your build definition. Enable the "Advanced Settings" option on the top right and check the option to "Checkout files from LFS".

这篇关于在 VSTF 构建中查看 git-lfs 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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