Skip to content

"Dubious ownership in repository" error running Docker container #81

@C-Duv

Description

@C-Duv

I tried to run git-fame via Docker using the following commands but got an "fatal: detected dubious ownership in repository at '/repo'" error:

# Build playground
cd "$(mktemp -d)"
git init .
echo "foo" > file1
echo "bar" > file2
git commit -a -m "First commit"
# Run git-fame
docker run --rm casperdcl/git-fame --help
docker run --rm -v "$(pwd)":/repo casperdcl/git-fame

Obtained output is:

fatal: detected dubious ownership in repository at '/repo'
To add an exception for this directory, call:

	git config --global --add safe.directory /repo
Processing: 100%|██████████| 1/1 [00:00<00:00, 695.69file/s]
error: too many arguments given outside repository
usage: git shortlog [<options>] [<revision-range>] [[--] <path>...]
   or: git log --pretty=short | git shortlog [<options>]

    -c, --committer       group by committer rather than author
    -n, --numbered        sort output according to the number of commits per author
    -s, --summary         suppress commit descriptions, only provides commit count
    -e, --email           show the email address of each author
    -w[<w>[,<i1>[,<i2>]]]
                          linewrap output
    --group <field>       group by field

Total 
| Author   | loc   | coms   | fils   |  distribution   |
|----------|-------|--------|--------|-----------------|

I guess the git config --global --add safe.directory /repo should be done in the casperdcl/git-fame Docker image?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions