Skip to content

fatal: detected dubious ownership in repository at '/checkout' #101438

New issue

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

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

Already on GitHub? # to your account

Open
nikic opened this issue Sep 5, 2022 · 3 comments
Open

fatal: detected dubious ownership in repository at '/checkout' #101438

nikic opened this issue Sep 5, 2022 · 3 comments
Labels
T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@nikic
Copy link
Contributor

nikic commented Sep 5, 2022

Running sudo src/ci/docker/run.sh x86_64-gnu on Fedora 35, I get the following error:

Building rustbuild
    Finished dev [unoptimized] target(s) in 0.03s
fatal: detected dubious ownership in repository at '/checkout'
To add an exception for this directory, call:

	git config --global --add safe.directory /checkout
thread 'main' panicked at 'command did not execute successfully: "git" "rev-list" "--author=bors@rust-lang.org" "-n1" "--first-parent" "HEAD" "--" "/checkout/src/llvm-project" "/checkout/src/bootstrap/download-ci-llvm-stamp" "/checkout/src/version"
expected success, got: exit status: 128', native.rs:132:20
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:00

Not sure why this started happening now, it used to work fine...

@nikic nikic added the T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. label Sep 5, 2022
@Mark-Simulacrum
Copy link
Member

@nikic You may need to set NO_DOWNLOAD_LLVM_CI; on CI we disable the git safety check here - https://github.com/rust-lang/rust/blob/master/src/ci/run.sh#L22

I guess that's not running for you, maybe because Fedora uses podman rather than docker and the user IDs at some level do match?

@nikic
Copy link
Contributor Author

nikic commented Sep 5, 2022

Hm, maybe this is because I ran with sudo. I just tried again without and it worked fine. I could have sworn that sudo was needed...

@cuviper
Copy link
Member

cuviper commented Sep 9, 2022

I could have sworn that sudo was needed...

I changed it recently for podman in #100930, but that's not supposed to have any effect if you're root (like sudo).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants