← Back to issue list

Craft parts should close stdin when cloning git projects

View original Github issue

Metadata

Project
craft-parts
Number
#899
Type
issue
State
open
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Git source handler in craft-parts does not close stdin when cloning, causing hangs when repos require credentials. Filed by maintainer mr-cal; only a Jira-sync bot comment exists. No fix found in git_source.py or base.py _run.

Suggested action: needs triage

Reason: The issue was filed by a maintainer (mr-cal) with a clear two-part scope (close stdin like deb.py does, and raise a friendly error for credential prompts) and a Jira ticket (CRAFT-3660) was auto-created, but no maintainer has labelled, assigned, or responded substantively. The code in git_source.py still calls self._run() without stdin=DEVNULL, confirming the bug persists. It needs triage to be prioritised and assigned.

Impact: 50 Quick Win: 32.5 Staleness: 55 Complexity: 35 Confidence: 72 Support Request: 5

Issue body

### What needs to get done 1. Similar to `apt` calls ([source](https://github.com/canonical/craft-parts/blob/2559930585682ceec00fccb150d508e95918b7f4/craft_parts/packages/deb.py#L611)), craft-parts should close stdin when cloning git repos. 2. If a repo requires credentials, craft-parts should raise a user-friendly error both locally and in CI (`snapcraft remote-build` is a good test). ### Why it needs to get done If a git repo requires credentials, craft-parts does not prevent block stdin. This produces unhelpful errors. source: https://chat.canonical.com/canonical/pl/wdbbgdpiupdymyzgfwiuys8cge

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 50
Quick Win: 32.5
Staleness: 55
Complexity: 35
Confidence: 72
Support Request: 5
needs triage Git source handler in craft-parts does not close stdin when cloning, causing hangs when repos require credentials. Filed by maintainer mr-cal; only a Jira-sync bot comment exists. No fix found in git_source.py or base.py _run.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 25
Confidence: 85
Support Request: 10
needs triage Request to close stdin during git cloning to prevent blocking and improve error handling for credential prompts. Currently unlabelled and inactive for over a year.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 20
Confidence: 80
Support Request: 10
needs triage Request to close stdin during git cloning and improve credential error handling. Unlabeled, inactive for over a year, awaiting maintainer triage.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 25
Confidence: 75
Support Request: 10
needs triage Close stdin during git cloning in craft-parts to prevent unhelpful credential prompts and add user-friendly error handling. Open, synced to Jira CRAFT-3660, awaiting implementation.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.