问题
I'm getting this error when trying to start a build on AWS CodeBuild:
CLIENT_ERROR: reference delta not found for primary source and source version 0b0b4b6ebc477f92c2d51f2ac4ad0fc0ebc46782
Is this error caused by git or AWS CodeBuild itself? How could I remove it?
Update 1:
Here is my CloudFormation configuration template:
CodeBuildProject:
Type: AWS::CodeBuild::Project
Properties:
Artifacts:
Type: NO_ARTIFACTS
Cache:
Location: LOCAL
Modes:
- LOCAL_CUSTOM_CACHE
Type: LOCAL
Environment:
ComputeType: BUILD_GENERAL1_SMALL
Image: aws/codebuild/standard:1.0
ImagePullCredentialsType: CODEBUILD
Type: LINUX_CONTAINER
LogsConfig:
CloudWatchLogs:
Status: ENABLED
GroupName: !Join ['/', ['', 'aws', 'codebuild', !Sub '${AWS::StackName}CodeBuildProject']]
Name: !Sub '${AWS::StackName}CodeBuildProject'
ServiceRole: !GetAtt CodeBuildProjectIAMRole.Arn
Source:
BuildSpec: |
version: 0.2
phases:
install:
commands:
- npm install -g yarn
- git config --global credential.helper '!aws codecommit credential-helper $@'
- git config --global credential.UseHttpPath true
- yarn
pre_build:
commands:
- git rev-parse HEAD
- git pull origin master
build:
commands:
- yarn run build
- yarn run deploy
post_build:
commands:
- echo 'Finished.'
GitCloneDepth: 0
Location: !ImportValue CodeCommitRepositoryCloneUrlHttp
Type: CODECOMMIT
来源:https://stackoverflow.com/questions/55838459/aws-codebuild-download-source-error-client-error-reference-delta-not-found