concourse / concourse/git-resource

detected dubious ownership in repository at '/tmp/build/get'

Open
#404 16 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Shell
Stars
203
Forks
305
Avg merge
11d 14h
Merged PRs (30d)
2

Description

Describe the bug

When attempting to get a git-resource, we receive the git error detected dubious ownership instead of pulling the source code.

Reproduction steps
  1. Deploy concourse quickstart using provided docker-compose.yml (using Concourse 7.9.1)

  2. Deploy a simple pipeline:

resources:
  - name: git-repo
    type: git
    icon: git
    source:
      uri: http://gitea:3000/org1/myproject
      username: ((gitea.username))
      password: ((gitea.password))
jobs:
- name: validate-repo
  plan:
    - get: git-repo
      trigger: false
    - task: list-files
      config:
        inputs:
          - name: git-repo
        platform: linux
        image_resource:
          type: registry-image
          source:
            repository: busybox
        run:
          path: tree
  1. Unpause the pipeline
  2. Receive the following error:
selected worker: 31354ca107d3
Cloning into '/tmp/build/get'...
fatal: detected dubious ownership in repository at '/tmp/build/get'
To add an exception for this directory, call:

	git config --global --add safe.directory /tmp/build/get

...

Expected behavior

Expect the git repo to be available for pipeline consumption,

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the Concourse quickstart docker-compose.yml and the pipeline shown, then inspect the git-resource behavior around cloning into /tmp/build/get. Confirm the change by running the same get step and verifying that the repository is available to the pipeline without the dubious-ownership error.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.