← Back to issue list

pulling repository can hang execution indefinitely

View original Github issue

Metadata

Project
craft-parts
Number
#933
Type
issue
State
open
Author
dariuszd21
Labels
Created
Updated
Closed

Current evaluation

Git source pull hangs indefinitely when repo is private/nonexistent because git prompts for credentials with no way to provide them. Reported Dec 2024, no maintainer response, no fix found in current code.

Suggested action: needs triage

Reason: The issue was filed 627 days ago with only a bot comment creating an internal Jira ticket (CRAFT-3805) and no maintainer acknowledgement, labels, or assignee. The bug is still present in the current code: git_source.py's _clone_new and _pull_existing methods run git clone/fetch without setting GIT_TERMINAL_PROMPT=0 or equivalent, so git will prompt for credentials and hang. The fix is straightforward (disable terminal prompts in the git subprocess environment), but the issue has never been triaged by a maintainer.

Impact: 50 Quick Win: 35.0 Staleness: 75 Complexity: 30 Confidence: 70 Support Request: 5

Issue body

### Bug Description During pull phase if repository is private or does not exist, craft will hung forever waiting for the credentials. It should immediately fail as there is no place for user to put the credentials in ### To Reproduce Build the source that requests you to use credentials (e.g. source from GitHub or Launchpad via `https://` that is not public or does not exist). ### part yaml ```yaml non-existing-part: # See 'snapcraft plugins' source: https://github.com/non-existing-user/non-existing-repo source-type: git plugin: nil ``` ### Relevant log output ``` 2024-12-12 10:37:22.198 execute action my-part:Action(part_name='my-part', step=Step.PULL, action_type=ActionType.RUN, reason=None, project_vars=None, properties=ActionProperties(changed_files=None, changed_dirs=None)) │ 2024-12-12 10:37:22.199 Executing: git clone --recursive https://github.com/non-existing-user/non-existing-repo │ 2024-12-12 10:37:22.201 :: Cloning into '/root/parts/my-part/src'... ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 50
Quick Win: 35.0
Staleness: 75
Complexity: 30
Confidence: 70
Support Request: 5
needs triage Git source pull hangs indefinitely when repo is private/nonexistent because git prompts for credentials with no way to provide them. Reported Dec 2024, no maintainer response, no fix found in current code.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 20
Confidence: 70
Support Request: 5
needs triage Git clone hangs indefinitely when pulling a private or non-existent repository, waiting for credentials instead of failing immediately. Currently unlabelled with minimal maintainer interaction since December 2024.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 30
Confidence: 75
Support Request: 5
needs triage Git clone hangs indefinitely when pulling a private or non-existent repository due to unhandled credential prompts. Currently unlabelled and inactive for over a year, awaiting maintainer assessment.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 30
Confidence: 75
Support Request: 5
needs triage craft hangs indefinitely during the pull phase when cloning a private or non-existent git repository, waiting for credentials that cannot be provided. Open, untriaged, last updated 465 days ago. Internal Jira ticket CRAFT-3805 created.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2052928 Pulling from private repository without known_hosts hangs forever snapcraft (launchpad) open SSH pull from private repo hangs when known_hosts is missing; SSH authenticity prompt is hidden by snapcraft progress bar. Untriaged, 935 days old.
72%
#5661 Snapcraft hangs forever if a GitHub repository doesn't exist snapcraft open Snapcraft hangs indefinitely on Pulling when a git source is missing/private because git prompts for credentials. Triaged by maintainers; fix identified (GIT_TERMINAL_PROMPT=0) but must be implemented in craft-parts, not yet done.
72%
#1058 SCP formatted git source cause infinite loading when packing craft-parts open Git source with SCP-style URL (github.com:user/repo) hangs forever during pull when the clone would fail, because ssh prompts for host-key confirmation in the managed instance. Untriaged, no maintainer activity for ~17 months; code path still present.
71%