← Back to issue list

Lack of support for ssh agent

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2018456
Type
issue
State
open
Author
~suligap
Labels
—
Created
Updated
Closed
—

Current evaluation

SSH pulls in core22 LXD builds hang on hidden interactive prompts; --bind-ssh only mounts ~/.ssh and never forwards SSH_AUTH_SOCK. Reproduced by maintainer, feature request still unimplemented.

Suggested action: keep open

Reason: Triaged and valid, so it must stay open: ~mr-cal reproduced it twice, provided a minimal `git+ssh://` source reproducer, and diagnosed the root cause -- "the interactive ssh prompt gets hidden and snapcraft hangs indefinitely" -- plus "That's certainly another place where snapcraft would hang" for password-protected keys. Code confirms the gap: `prepare_instance()` in snapcraft/providers.py:348 only mounts `Path.home() / ".ssh"` into the instance, and the repo has zero occurrences of `SSH_AUTH_SOCK` or `known_hosts`, so no agent forwarding or prompt handling exists. It is not yet turnkey-ready because the desired solution is still undecided -- the reporter asks for host ssh-agent forwarding while ~mr-cal proposed instead returning the interactive tty during `git clone` -- and no implementation landed in 1074 days. Impact is moderate (developer-workflow hang in a supported core22+LXD path, not app-breaking, with a known_hosts workaround), and complexity is mid-high since agent-socket forwarding through craft-providers versus tty pass-through are meaningfully different designs. Note the core20 portion of the report became moot after fa7952b4d ("chore!: drop core20", PR #6019), but core22 remains supported so the issue is still valid; confidence is not higher because no maintainer response exists after 2023-10-24, so current prioritization is unconfirmed.

Evaluated by: mr-cal-bot

Impact: 52 Quick Win: 12 Complexity: 62 Confidence: 84 Actionability: 63

Issue body

The pull step gets stuck for core22 based snaps during     snapcraft pull --bind-ssh --use-lxd when it tries to execute git clone via ssh. The host has properly configured ssh key and ssh agent running. $ snap list snapcraft Name Version Rev Tracking Publisher Notes snapcraft 7.3.1 8931 latest/candidate canonical✓ classic snapcraft log: https://pastebin.canonical.com/p/cBVVg4HDc2/

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 52
Quick Win: 12
Complexity: 62
Confidence: 84
Actionability: 63
keep open SSH pulls in core22 LXD builds hang on hidden interactive prompts; --bind-ssh only mounts ~/.ssh and never forwards SSH_AUTH_SOCK. Reproduced by maintainer, feature request still unimplemented.
stealth/space-bunny-alpha
Impact: 58
Quick Win: 15
Complexity: 64
Confidence: 92
Actionability: 73
keep open SSH pulls in core20/core22 LXD builds can hang on hidden prompts; --bind-ssh still only mounts ~/.ssh and does not forward SSH_AUTH_SOCK. Reproduced upstream and remains unimplemented.
stealth/space-bunny-alpha
Impact: 45
Quick Win: 19
Complexity: 45
Confidence: 82
Actionability: 78
needs triage Untriaged: Snapcraft 7.3.1 core22/LXD pulls hang on SSH git clones despite a running host agent. Later .ssh binding work may help, but agent forwarding is unverified.
qwen3.6-35b-a3b-mtp-q6
Impact: 50
Quick Win: 25
Staleness: 95
Complexity: 50
Confidence: 55
Support Request: 30
needs triage Untriaged issue from 1218 days ago about snapcraft pull --bind-ssh getting stuck during git clone via SSH. No maintainer response or labels.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 20
close stale Bug report regarding snapcraft pull step hanging during git clone via SSH for core22 snaps. Issue is over 3 years old with no maintainer interaction or labels.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 35
Confidence: 80
Support Request: 20
close stale Report of snapcraft pull --bind-ssh getting stuck during git clone via SSH in LXD containers. No maintainer comments, labels, or updates in over three years. Likely resolved or irrelevant in current snapcraft versions.
qwen3.6-35b-a3b-mtp-q6
Staleness: 85
Complexity: 40
Confidence: 70
Support Request: 20
needs triage Unlabelled issue reporting snapcraft pull failing to forward SSH agent in LXD, causing git clone hangs. No maintainer comments or labels after over three years.

Update history

Date Change
created

Related work

  • Related To: canonical/snapcraft#3796 (confidence 82%)

    Merged PR b3f3e68b0 added the existing ~/.ssh bind for --bind-ssh via craft-providers; it did not add agent forwarding, which is what this issue requests.

  • Superseded By: canonical/snapcraft#6019 (confidence 70%)

    Commit fa7952b4d 'chore!: drop core20' removed the core20 half of the report, but core22 LXD builds still support --bind-ssh so the issue remains valid.

Related issues

No related issues found above the similarity threshold.