Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal: unsafe repository ('/path/to/repo' is owned by someone else) #159

Closed
atc0005 opened this issue May 5, 2022 · 1 comment · Fixed by #160
Closed

fatal: unsafe repository ('/path/to/repo' is owned by someone else) #159

atc0005 opened this issue May 5, 2022 · 1 comment · Fixed by #160
Assignees
Labels
bug Something isn't working builds
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented May 5, 2022

Running make docker to build new binaries produces this error message:

fatal: unsafe repository ('/path/to/repo' is owned by someone else)
To add an exception for this directory, call:

        git config --global --add safe.directory /path/to/repo

A brief Google search leads me to these resources:

One of the workarounds given:

  • run the container as a user that has access to the mounted directory

The upside is that it runs the build container without root privileges, which is a win in itself.

@atc0005 atc0005 added bug Something isn't working builds labels May 5, 2022
@atc0005 atc0005 added this to the v0.2.2 milestone May 5, 2022
@atc0005 atc0005 self-assigned this May 5, 2022
@atc0005
Copy link
Owner Author

atc0005 commented May 5, 2022

atc0005 added a commit that referenced this issue May 5, 2022
Resolve the `fatal: unsafe repository
('/path/to/repo' is owned by someone else)` error message
thrown by newer Git versions by:

- execute Alpine Docker build containers as non-root user
  - attempt current UID by default, fallback to trying UID 1000
- explicitly set `GOCACHE` environment variable to `/tmp/`
  within build container
  - resolve permission issue with the go toolchain attempting to
    use `/.cache` by default within the Docker container

refs GH-159
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working builds
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant