Skip to content

Prevent SSH prompts during sandboxed Git fetches - #24117

Merged
MikeMcQuaid merged 1 commit into
mainfrom
fetch-ssh-credentials
Sep 29, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
fetch-ssh-credentials

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Fail promptly when SSH cannot decrypt a private key instead of waiting for input hidden by concurrent download output.
  • Preserve sandbox permissions and existing SSH agent support.

Fixes #24115


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Codex with GPT 6 Astra at Extra High effort, with local review and testing.


- Fail promptly when SSH cannot decrypt a private key instead of
  waiting for input hidden by concurrent download output.
- Preserve sandbox permissions and existing SSH agent support.

Fixes #24115
Copilot AI lite review requested due to automatic review settings September 29, 2026 10:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Prevents sandboxed Git fetches from hanging on SSH passphrase prompts while preserving SSH agent support.

Changes:

  • Forces non-interactive SSH askpass failures.
  • Adds regression coverage for encrypted SSH keys and environment preservation.
File Description
Library/​Homebrew/​test/​download_strategies/​git_spec.rb Tests prompt-free SSH failure behavior and preserved environment values.
Library/​Homebrew/​download_strategy/​git_download_strategy.rb Configures non-interactive SSH handling during sandboxed fetches.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit 9763df7 Sep 29, 2026
113 of 115 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the fetch-ssh-credentials branch September 29, 2026 11:26
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.

brew fetch hangs indefinitely due to sandbox denying lookup for com.apple.securityd.xpc

3 participants

⌂ 换网址