Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-3837

Pull request merges fail with "Could not get current working directory"

    XMLWordPrintable

Details

    Description

      The first step for merging a pull request (for real, or to display the diff) is to clone the repository. That can sometimes fail with an error like this:

      2013-09-05 13:55:17,589 DEBUG [http-bio-7990-exec-32] jdoe 835x22267x4 zczu8x 10.0.0.1 "GET /rest/api/latest/projects/KEY/repos/slug/pull-requests/1/merge HTTP/1.0" com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git clone --no-checkout --shared -b master /var/atlassian/stash-home/data/repositories/1 /var/atlassian/stash-home/tmp/git/slug-merge3500642069922585665.git
      2013-09-05 13:55:17,676 DEBUG [http-bio-7990-exec-32] jdoe 835x22267x4 zczu8x 10.0.0.1 "GET /rest/api/latest/projects/KEY/repos/slug/pull-requests/1/merge HTTP/1.0" c.a.s.i.s.g.DefaultGitPullRequestCommandFactory 1: Pull request 1@0 failed automatic merging
      com.atlassian.stash.scm.MergeException: feature-branch could not be merged to master automatically. Please clone KEY/slug, checkout master and merge feature-branch (or revision 0a943a29376f2336b78312d99e65da17048951db) manually, resolving any conflicts, and push the result.
      ...
      Caused by: com.atlassian.stash.exception.ServerException: An error occurred while executing an external process: '/usr/bin/git clone --no-checkout --shared -b master /var/atlassian/stash-home/data/repositories/1 /var/atlassian/stash-home/tmp/git/slug-merge3500642069922585665.git' exited with code 128 saying: fatal: Could not get current working directory: No such file or directory
      

      This may happen when the user running Stash does not have sufficient permissions for the working directory used when Stash was started, or if that working directory is removed or altered.

      Attachments

        Activity

          People

            bturner Bryan Turner (Inactive)
            bturner Bryan Turner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: