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

Fix git2 safe-directory disable #11366

Merged
merged 1 commit into from
Nov 12, 2022
Merged

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Nov 12, 2022

The call to set_verify_owner_validation was not getting called unless a network configuration was found. This means in the common case that cargo new will fail when there is a safe-directory error. This fixes the issue by making sure that set_verify_owner_validation is called before the early-exits in init_git_transports.

Fixes #11365

@rustbot
Copy link
Collaborator

rustbot commented Nov 12, 2022

r? @epage

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 12, 2022
@ehuss ehuss added the beta-nominated Nominated to backport to the beta branch. label Nov 12, 2022
@ehuss
Copy link
Contributor Author

ehuss commented Nov 12, 2022

In the process of fixing this, I noticed several other problems with git2, with fixes posted at libgit2/libgit2#6427 and rust-lang/git2-rs#894. I don't think either of those are necessary for cargo, though.

Nominating for beta since this is a stable regression in 1.65. I'm not sure if it will be important for a stable backport. This is only the first report I've seen in the week since it is released, but it may be good to keep an eye on more reports.

@epage
Copy link
Contributor

epage commented Nov 12, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Nov 12, 2022

📌 Commit 632da89 has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2022
@bors
Copy link
Contributor

bors commented Nov 12, 2022

⌛ Testing commit 632da89 with merge 040ee97...

bors added a commit that referenced this pull request Nov 12, 2022
Fix git2 safe-directory disable

The call to `set_verify_owner_validation` was not getting called unless a network configuration was found. This means in the common case that `cargo new` will fail when there is a safe-directory error. This fixes the issue by making sure that `set_verify_owner_validation` is called before the early-exits in `init_git_transports`.

Fixes #11365
@bors
Copy link
Contributor

bors commented Nov 12, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 12, 2022
@ehuss
Copy link
Contributor Author

ehuss commented Nov 12, 2022

@bors retry

proptest #6258

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2022
@bors
Copy link
Contributor

bors commented Nov 12, 2022

⌛ Testing commit 632da89 with merge f5cdfa4...

@bors
Copy link
Contributor

bors commented Nov 12, 2022

☀️ Test successful - checks-actions
Approved by: epage
Pushing f5cdfa4 to master...

@bors bors merged commit f5cdfa4 into rust-lang:master Nov 12, 2022
ehuss pushed a commit to ehuss/cargo that referenced this pull request Nov 15, 2022
Fix git2 safe-directory disable

The call to `set_verify_owner_validation` was not getting called unless a network configuration was found. This means in the common case that `cargo new` will fail when there is a safe-directory error. This fixes the issue by making sure that `set_verify_owner_validation` is called before the early-exits in `init_git_transports`.

Fixes rust-lang#11365
bors added a commit that referenced this pull request Nov 15, 2022
[beta-1.66] Backport fix for git2 safe-directory disable

This is a beta backport of #11366.
bors added a commit that referenced this pull request Nov 15, 2022
[beta-1.66] Backport fix for git2 safe-directory disable

Beta backports:

* #11366 — fix git2 safe-directory disable
* #11332 — fix semver documentation for change in non_exhaustive
* #11335 — Clean more aggressively in CI
weihanglo added a commit to weihanglo/rust that referenced this pull request Nov 16, 2022
5 commits in a3dfea71ca0c888a88111086898aa833c291d497..16b097879b6f117c8ae698aab054c87f26ff325e
2022-11-11 03:50:47 +0000 to 2022-11-14 23:28:16 +0000
- improve error message for cargo add/remove (rust-lang/cargo#11375)
- Bump crate versions of `cargo-util` and `crates-io` (rust-lang/cargo#11369)
- doc(changelog): suggestions of cargo fix are nightly only (rust-lang/cargo#11373)
- Add warning when PATH env separator is in project path (rust-lang/cargo#11318)
- Fix git2 safe-directory disable (rust-lang/cargo#11366)
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 16, 2022
Update cargo

5 commits in a3dfea71ca0c888a88111086898aa833c291d497..16b097879b6f117c8ae698aab054c87f26ff325e 2022-11-11 03:50:47 +0000 to 2022-11-14 23:28:16 +0000
- improve error message for cargo add/remove (rust-lang/cargo#11375)
- Bump crate versions of `cargo-util` and `crates-io` (rust-lang/cargo#11369)
- doc(changelog): suggestions of cargo fix are nightly only (rust-lang/cargo#11373)
- Add warning when PATH env separator is in project path (rust-lang/cargo#11318)
- Fix git2 safe-directory disable (rust-lang/cargo#11366)

r? `@ghost`
@ehuss ehuss added this to the 1.67.0 milestone Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-nominated Nominated to backport to the beta branch. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempting to run cargo new hello_cargo gives an error, not finding safe.directory
4 participants