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

dont use --user flag for local #2477

Merged
merged 1 commit into from Jan 6, 2024
Merged

dont use --user flag for local #2477

merged 1 commit into from Jan 6, 2024

Conversation

abvaidya
Copy link
Collaborator

@abvaidya abvaidya commented Jan 5, 2024

Description

Contribution Checklist:

  • The pull request does not introduce any breaking changes
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Attach Screenshots (Optional)

Signed-off-by: Abhijeet V <31417623+abvaidya@users.noreply.github.com>
@havetisyan havetisyan merged commit 69521a4 into master Jan 6, 2024
2 checks passed
@havetisyan havetisyan deleted the docker-local branch January 6, 2024 01:29
@hiragi-gkuth
Copy link
Contributor

hiragi-gkuth commented Jan 12, 2024

Hi @abvaidya

I have a question about this update. After this change, the "make deploy-local" command started failing with the following error. It seems that git throws an error when the user in the container is different from the host.

What was the purpose of this PR? Also, is this issue already known?

cd docker/ && make deploy-local
# generate self-signed certificates
docker run --rm -t -v "/Users/hiragi-gkuth/ghq/github.com/athenz/athenz:/athenz" athenz/athenz-setup-env bash /athenz/docker/setup-scripts/self-signed-certificates.sh

#################################################
### try-out-Athenz-with-self-signed-CA.md
#################################################


# Prepare certificates
1. set up env.
fatal: detected dubious ownership in repository at '/athenz'
To add an exception for this directory, call:

        git config --global --add safe.directory /athenz
make: *** [deploy-local] Error 128

version info

 ❯ uname -a
Darwin localhost 22.6.0 Darwin Kernel Version 22.6.0: Wed Oct  4 21:26:55 PDT 2023; root:xnu-8796.141.3.701.17~4/RELEASE_ARM64_T6020 arm64
 ❯ docker version                                                                                                                                                                                                                                                                                                  [15:12:52]
Client:
 Version:           24.0.6-rd
 API version:       1.42 (downgraded from 1.43)
 Go version:        go1.20.7
 Git commit:        da4c87c
 Built:             Wed Sep  6 16:40:13 2023
 OS/Arch:           darwin/arm64
 Context:           rancher-desktop

Server:
 Engine:
  Version:          23.0.6
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       9dbdbd4b6d7681bd18c897a6ba0376073c2a72ff
  Built:            Thu Oct 12 14:14:03 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.7.2
  GitCommit:        0cae528dd6cb557f7201036e9f43420650207b58
 runc:
  Version:          1.1.7
  GitCommit:        860f061b76bb4fc671f0f9e900f7d80ff93d4eb7
 docker-init:
  Version:          0.19.0
  GitCommit:

@abvaidya
Copy link
Collaborator Author

Interesting, in fact I added that PR because I was getting this error while running make deploy-local on my laptop.
I believe the alternate option is to add a .gitconfig in relevant athenz images with /athenz is marked as a "safe" directory.

@hiragi-gkuth
Copy link
Contributor

hiragi-gkuth commented Jan 19, 2024

@abvaidya

Interesting, in fact I added that PR because I was getting this error while running make deploy-local on my laptop.

I wonder if why this happens with the same container image and deploy scripts. Maybe the container engine affects this.

I believe the alternate option is to add a .gitconfig in relevant athenz images with /athenz is marked as a "safe" directory.

Thanks for proposing a solution. I'm trying to see if it works. And if sucess, I'll make a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants