← Back to issue list

mishandled private git+ssh repo url

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2008502
Type
issue
State
open
Author
~ondrak
Labels
Created
Updated
Closed

Current evaluation

Snapcraft 7.2.8 treats a git+ssh:// source URL as a local file path when cloning a private Launchpad repo, so git clone fails. No maintainer response in over 3 years; the pip-style scheme is invalid for git, which only accepts ssh:// or user@host:path forms.

Suggested action: close not a bug

Reason: The reported failure is working as intended: 'git+ssh://' is a pip-style scheme that neither git nor craft-parts recognizes as a remote URL, so it is (correctly) treated as a local path, as shown by the 'file:///home/ubuntu/test-snap/git+ssh://...' clone command in the error. The user should use 'ssh://git.launchpad.net/~my-team/me/+git/my-project' or 'git@launchpad.net:~my-team/me/+git/my-project' instead; at most a clearer error message for unrecognized schemes could be filed separately.

Impact: 15 Quick Win: 12.75 Staleness: 85 Complexity: 15 Confidence: 60 Support Request: 80

Issue body

when using a private git repository from Launchpad, snapcraft fails to fetch the repo content as it tries to convert url to the local path name: test-snap base: core22 parts: private-repo: plugin: dump source: git+ssh://git.launchpad.net/~my-team/me/+git/my-project source-type: git source-branch: main source-depth: 1 prime: - -* This example will result in the following error: Failed to pull source: command ['git', 'clone', '--recursive', '--branch', 'upstream', '--depth', '1', 'file:///home/ubuntu/test-snap/git+ssh://git.launchpad.net/~my-team/me/+git/my-project', PosixPath('/home/ubuntu/host/test-snap/parts/private-repo/src')] exited with code 128. snapcraft 7.2.8.post26+git15d684d5

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 15
Quick Win: 12.75
Staleness: 85
Complexity: 15
Confidence: 60
Support Request: 80
close not a bug Snapcraft 7.2.8 treats a git+ssh:// source URL as a local file path when cloning a private Launchpad repo, so git clone fails. No maintainer response in over 3 years; the pip-style scheme is invalid for git, which only accepts ssh:// or user@host:path forms.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 35
Confidence: 85
Support Request: 10
close stale Snapcraft incorrectly converts private git+ssh URLs to local file paths, causing fetch failures. The report is over three years old with no maintainer engagement or updates.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 5
close stale Bug report detailing snapcraft incorrectly converting a git+ssh URL to a local file path during clone, causing a git clone failure. Unlabelled, zero comments, over 3 years old.
qwen3.6-35b-a3b-mtp-q6
Staleness: 90
Complexity: 40
Confidence: 75
Support Request: 5
close stale snapcraft fails to fetch private git+ssh repositories by incorrectly converting the URL to a local file path. The issue is over 3 years old with no maintainer interaction.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 35
Confidence: 85
Support Request: 5
close stale Snapcraft incorrectly converts git+ssh URLs to local file paths when cloning private repositories, causing clone failures. Status remains open, untriaged, and inactive for over three years with no comments or assignees.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2053119 Pulling from private repository with passphrase protected key fails snapcraft (launchpad) open snapcraft --bind-ssh fails to prompt for passphrase when using passphrase-protected SSH keys to clone private repositories. Untriaged, no maintainer response after 933 days.
71%
#1516228 missing " git://" in the source crashes the snapcraft snapcraft (launchpad) closed Closed without resolution. The snapcraft crash from missing git:// source prefixes was abandoned. Modern snapcraft versions enforce explicit protocol specification or handle defaults gracefully.
71%
#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.
70%
#1979529 local git repositories cannot be cloned snapcraft (launchpad) closed Abandoned. Local git repositories could not be cloned via source-type: git. A workaround using SNAPCRAFT_PROJECT_DIR in override-build was provided. No resolution was implemented.
70%