由于AWS CodeBuild似乎不支持git LFS(大文件系统),因此我尝试安装它:
version: 0.2
phases:
install:
commands:
- apt-get install -y bash curl
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
- apt-get install -y git-lfs
pre_build:
commands:
- echo Downloading LFS files
- git lfs pull
build:
commands:
- echo Build started on `date`
post_build:
commands:
- echo Build completed on `date`
针对上述代码,我得到了以下错误(已重命名仓库地址):
[Container] 2020/06/18 16:02:17 Running command git lfs pull
fatal: could not read Password for 'https://username@bitbucket.org': No such device or address
batch response: Git credentials for https://username@bitbucket.org/company/repo.git not found.
error: failed to fetch some objects from 'https://username@bitbucket.org/company/repo.git/info/lfs'
[Container] 2020/06/18 16:02:17 Command did not exit successfully git lfs pull exit status 2
[Container] 2020/06/18 16:02:17 Phase complete: PRE_BUILD State: FAILED
[Container] 2020/06/18 16:02:17 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: git lfs pull. Reason: exit status 2
我还能做些什么来获取LFS文件吗?