java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: MAV-MBT-JOB1-201: Checkout to revision 6681d2b8c3009b04ab49b949d31832cd03939ad6 has failed.command /usr/bin/git checkout -f master failed with code 128. Working directory was [/var/atlassian/application-data/bamboo_510/xml-data/build-dir/131073/MAV-MBT-JOB1]., stderr: Downloading test3.jpg (12.57 MB) Error accessing media: test3.jpg (24fda5852ed8527b134501db6877591edbefbadb6f4e05ba5c8c4c4c91f73f92) Errors logged to .git/lfs/objects/logs/20160128T050400.487728317.log Use `git lfs logs last` to view the log. error: external filter git-lfs smudge %f failed 2 error: external filter git-lfs smudge %f failed fatal: test3.jpg: smudge filter lfs failed

Atlassian JIRA | David Chevell | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h3. Summary Git Large File Storage (or LFS) is a new, open-source extension to Git that aims to improve handling of large files. Source code checkouts fail in Bamboo when linked to LFS-enabled repositories h3. Steps to Reproduce # Set up a repository with [Git LFS enabled|https://confluence.atlassian.com/display/BitbucketServer/Git+Large+File+Storage#GitLargeFileStorage-repolfsEnablingGitLFSforarepository] # Add file types for LFS to manage and include at least one file of that type in the repository # [Install git-lfs client extension|https://confluence.atlassian.com/display/BitbucketServer/Git+Large+File+Storage#GitLargeFileStorage-InstallingtheGitLFScommandlineclient] on Bamboo server # Link LFS-enabeld repository to build plan with a [source checkout task|https://confluence.atlassian.com/bamboo/checking-out-code-289277060.html] enabled h3. Expected Results Source checkout should complete successfully h3. Actual Results When Bamboo attempts to checkout repositories with git-lfs enabled, the checkout process fails with "Error accessing media" and "smudge filter lfs failed" errors. The following stack trace can be found in *<BAMBOO_INST>/logs/catalina.out*{noformat}2016-01-28 05:04:00,499 ERROR [13-BAM::Default Agent::Agent:pool-28-thread-1] [TaskExecutorImpl] Error occurred while running Task 'Checkout Default Repository(1)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.checkout. java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: MAV-MBT-JOB1-201: Checkout to revision 6681d2b8c3009b04ab49b949d31832cd03939ad6 has failed.command /usr/bin/git checkout -f master failed with code 128. Working directory was [/var/atlassian/application-data/bamboo_510/xml-data/build-dir/131073/MAV-MBT-JOB1]., stderr: Downloading test3.jpg (12.57 MB) Error accessing media: test3.jpg (24fda5852ed8527b134501db6877591edbefbadb6f4e05ba5c8c4c4c91f73f92) Errors logged to .git/lfs/objects/logs/20160128T050400.487728317.log Use `git lfs logs last` to view the log. error: external filter git-lfs smudge %f failed 2 error: external filter git-lfs smudge %f failed fatal: test3.jpg: smudge filter lfs failed at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:144) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:203) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:188) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.execute(VcsCheckoutTask.java:145) at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$121(TaskExecutorImpl.java:273) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:273) at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:108) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:214) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130) at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:136) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: com.atlassian.bamboo.repository.RepositoryException: MAV-MBT-JOB1-201: Checkout to revision 6681d2b8c3009b04ab49b949d31832cd03939ad6 has failed.command /usr/bin/git checkout -f master failed with code 128. Working directory was [/var/atlassian/application-data/bamboo_510/xml-data/build-dir/131073/MAV-MBT-JOB1]., stderr: Downloading test3.jpg (12.57 MB) Error accessing media: test3.jpg (24fda5852ed8527b134501db6877591edbefbadb6f4e05ba5c8c4c4c91f73f92) Errors logged to .git/lfs/objects/logs/20160128T050400.487728317.log Use `git lfs logs last` to view the log. error: external filter git-lfs smudge %f failed 2 error: external filter git-lfs smudge %f failed fatal: test3.jpg: smudge filter lfs failed at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.checkout(NativeGitOperationHelper.java:368) at com.atlassian.bamboo.plugins.git.GitRepository$2.call(GitRepository.java:479) at com.atlassian.bamboo.plugins.git.GitRepository$2.call(GitRepository.java:446) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:312) at com.atlassian.bamboo.plugins.git.GitRepository.retrieveSourceCode(GitRepository.java:445) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.fillWorkingDirFromVcs(VcsCheckoutTask.java:273) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask.access$000(VcsCheckoutTask.java:57) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:150) at com.atlassian.bamboo.plugins.vcs.task.VcsCheckoutTask$1.call(VcsCheckoutTask.java:146) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) ... 20 more Caused by: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git checkout -f master failed with code 128. Working directory was [/var/atlassian/application-data/bamboo_510/xml-data/build-dir/131073/MAV-MBT-JOB1]., stderr: Downloading test3.jpg (12.57 MB) Error accessing media: test3.jpg (24fda5852ed8527b134501db6877591edbefbadb6f4e05ba5c8c4c4c91f73f92) Errors logged to .git/lfs/objects/logs/20160128T050400.487728317.log Use `git lfs logs last` to view the log. error: external filter git-lfs smudge %f failed 2 error: external filter git-lfs smudge %f failed fatal: test3.jpg: smudge filter lfs failed at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:587) at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:530) at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCheckoutCommandForBranchOrRevision(GitCommandProcessor.java:337) at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCheckoutCommand(GitCommandProcessor.java:331) at com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.checkout(NativeGitOperationHelper.java:352) ... 29 more{noformat} h3.Workaround In order to checkout git-lfs enabled repositories, the checkout must be performed manually via a scripted task. For example, the following script will perform a checkout for the current branch of your configured plan and can be used in place of the source code checkout task (please note this is a very basic example and your needs may require more customisation): {code}git init git remote add -t ${bamboo.planRepository.branchName} -f origin https://username:password@mygitrepo.org/scm/proj/myrepo.git git checkout -f ${bamboo.planRepository.branchName} {code}

    Atlassian JIRA | 1 year ago | David Chevell
    java.lang.RuntimeException: com.atlassian.bamboo.repository.RepositoryException: MAV-MBT-JOB1-201: Checkout to revision 6681d2b8c3009b04ab49b949d31832cd03939ad6 has failed.command /usr/bin/git checkout -f master failed with code 128. Working directory was [/var/atlassian/application-data/bamboo_510/xml-data/build-dir/131073/MAV-MBT-JOB1]., stderr: Downloading test3.jpg (12.57 MB) Error accessing media: test3.jpg (24fda5852ed8527b134501db6877591edbefbadb6f4e05ba5c8c4c4c91f73f92) Errors logged to .git/lfs/objects/logs/20160128T050400.487728317.log Use `git lfs logs last` to view the log. error: external filter git-lfs smudge %f failed 2 error: external filter git-lfs smudge %f failed fatal: test3.jpg: smudge filter lfs failed

    Root Cause Analysis

    1. com.atlassian.bamboo.plugins.git.GitCommandException

      command /usr/bin/git checkout -f master failed with code 128. Working directory was [/var/atlassian/application-data/bamboo_510/xml-data/build-dir/131073/MAV-MBT-JOB1]., stderr: Downloading test3.jpg (12.57 MB) Error accessing media: test3.jpg (24fda5852ed8527b134501db6877591edbefbadb6f4e05ba5c8c4c4c91f73f92) Errors logged to .git/lfs/objects/logs/20160128T050400.487728317.log Use `git lfs logs last` to view the log. error: external filter git-lfs smudge %f failed 2 error: external filter git-lfs smudge %f failed fatal: test3.jpg: smudge filter lfs failed

      at com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand()
    2. com.atlassian.bamboo
      NativeGitOperationHelper.checkout
      1. com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:587)
      2. com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCommand(GitCommandProcessor.java:530)
      3. com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCheckoutCommandForBranchOrRevision(GitCommandProcessor.java:337)
      4. com.atlassian.bamboo.plugins.git.GitCommandProcessor.runCheckoutCommand(GitCommandProcessor.java:331)
      5. com.atlassian.bamboo.plugins.git.NativeGitOperationHelper.checkout(NativeGitOperationHelper.java:352)
      5 frames