← Back to issue list

Snapcraft hangs forever if a GitHub repository doesn't exist

View original Github issue

Metadata

Project
snapcraft
Number
#5661
Type
issue
State
open
Author
vandah
Labels
Status: Triaged Type: Bug
Created
Updated
Closed
—

Current evaluation

Snapcraft 8.10.2 hangs during part pulls when Git prompts for credentials; maintainers assigned the fix to craft-parts, where the equivalent issue remains open.

Suggested action: keep open

Reason: The report provides an exact configuration, command, and interrupted log, while maintainer @mr-cal confirmed that blocked stdin caused the hang and @lengau identified GIT_TERMINAL_PROMPT=0 as the likely fix. No such change is present in the inspected Snapcraft code, and the equivalent craft-parts issue remains open, so this valid, triaged bug should stay open.

Evaluated by: mr-cal-bot

Impact: 65 Quick Win: 46 Complexity: 22 Confidence: 95 Actionability: 90

Issue body

### Bug Description When source for a part is a GitHub repository which doesn't exist or is private and the user doesn't have GitHub credentials saved, snapcraft just hangs on `Pulling <part-name>....`. I tried waiting over an hour and it didn't even timeout. I'm assuming this is happening because `git` itself asks for username and password and waits for user input. ```bash $ git clone --recursive https://github.com/somename/somerepo.git Cloning into 'somerepo'... Username for 'https://github.com': ``` ### To Reproduce - run `snapcraft` ### Environment I'm running Snapcraft 8.10.2 on Ubuntu 24.04 LTS, using Multipass. ### snapcraft.yaml ```yaml name: snapcraft-git-issue base: core24 version: '0.1' summary: Single-line elevator pitch for your amazing snap description: | This is my-snap's description. You have a paragraph or two to tell the most important story about your snap. Keep it under 100 words though, we live in tweetspace and your description wants to look good in the snap store. grade: stable confinement: strict parts: my-part: plugin: dump source: https://github.com/somename/somerepo.git ``` ### Relevant log output ```shell :: 2025-08-01 16:10:05.219 verify plugin environment for part 'my-part' :: 2025-08-01 16:10:05.222 Pulling my-part :: 2025-08-01 16:10:05.224 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)) :: 2025-08-01 16:10:05.227 Executing: /snap/snapcraft/15369/libexec/snapcraft/craft.git clone --recursive https://github.com/somename/somerepo.git :: 2025-08-01 16:10:05.466 :: Cloning into '/root/parts/my-part/src'... :: 2025-08-01 16:15:57.636 Interrupted. ``` ### Additional context _No response_

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 65
Quick Win: 46
Complexity: 22
Confidence: 95
Actionability: 90
keep open Snapcraft 8.10.2 hangs during part pulls when Git prompts for credentials; maintainers assigned the fix to craft-parts, where the equivalent issue remains open.
qwen/qwen3.6-35b-a3b
Impact: 40
Quick Win: 26
Complexity: 20
Confidence: 75
Actionability: 80
keep open Snapcraft hangs indefinitely when cloning non-existent GitHub repos due to git credential prompt. Maintainers identified fix: set GIT_TERMINAL_PROMPT=0 in craft-parts.
qwen/qwen3.8-27b
Impact: 50
Quick Win: 32
Staleness: 55
Complexity: 35
Confidence: 80
Support Request: 5
keep 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.
qwen/qwen3.6-35b-a3b
Staleness: 75
Complexity: 25
Confidence: 85
Support Request: 5
keep open Snapcraft hangs indefinitely when cloning a non-existent or private GitHub repository without credentials. Triaged and acknowledged by maintainers, who suggest setting GIT_TERMINAL_PROMPT=0 to prevent the hang. Awaiting implementation.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 40
Confidence: 85
Support Request: 10
keep open Valid bug where snapcraft hangs indefinitely when cloning non-existent or private GitHub repos without credentials. Triaged by maintainers who proposed setting GIT_TERMINAL_PROMPT=0, but remains inactive for over a year awaiting implementation.

Update history

No update history recorded yet.

Related work

  • Blocked By: canonical/craft-parts#933 (confidence 97%)

    The open upstream issue covers the same indefinite hang caused by Git credential prompts and belongs in craft-parts.

Related issues

Issue Project State Summary Similarity
#2053119 Pulling from private repository with passphrase protected key fails snapcraft (launchpad) open Snapcraft 8.0.2 with --bind-ssh fails to prompt for a passphrase-protected SSH key during a private Git clone; no fix or maintainer triage is recorded.
74%
#1867052 Snapcraft crashes while creating snap for ssh-audit snapcraft (launchpad) closed Closed as stale after prolonged inactivity; no Snapcraft PR or commit was cited as resolving the ssh-audit FileNotFoundError.
72%
#4843 snapcraft 8.2.10 build failure snapcraft closed Resolved the 8.2.10 Homebrew build failure by correcting the stale craft-parts dependency and shipping Snapcraft 8.2.12 with craft-parts 1.30.1.
71%