我有一个在 Azure Repos 中使用 Git LFS 的项目,其中使用 Git LFS 签入了几个二进制图像文件。当我的 Azure Pipelines 构建执行 . 时git pull,图像文件不会从 Git LFS 中提取,我留下了几个零字节图像文件。
我正在使用自定义的自托管 Azure Pipelines 构建服务器,该服务器上安装了最新版本的 Git LFS:
PS C:\rehan> git lfs --version git-lfs/2.7.2 (GitHub; windows amd64; go 1.12.2; git 08a08ae0)
Run Code Online (Sandbox Code Playgroud)
我试过添加步骤来执行,git lfs install但这没有帮助。当我git lfs pull登录到构建服务器后手动执行 a 时,文件被正确下载。当我git lfs pull在 Azure Pipeline 中作为构建步骤运行时,出现以下错误:
fatal: could not read Username for 'https://foo.visualstudio.com': terminal prompts disabled
batch response: Git credentials for https://foo.visualstudio.com/Bar/_git/Bar not found.
error: failed to fetch …Run Code Online (Sandbox Code Playgroud)