Failed to git clone if url contains git+ssh as prefix

Bug #1997231 reported by Aristo Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapcraft (Ubuntu)
Fix Released
Undecided
Callahan Kovacs

Bug Description

Hello,

This is Aristo from OEM Enablement team in Taiwan, I am trying to use snapcraft(version 7.2.8) to build a gadget snap, the following is part of the snapcraft.yaml

"""
u-boot:
    plugin: nil
    source: git+ssh://git.launchpad.net/~<MY_TEAM>/<MY_PROJECT>/+git/u-boot
    source-type: git
    source-depth: 1
    source-branch: classic
"""
When I execute sudo snapcraft --destructive-mode, it will have this error

"""
Failed to pull source: command ['git', 'clone', '--recursive', '--branch', 'classic', '--depth', '1', 'file:///home/vagrant/aristo/baytown/classic22/gadget-snap/git+ssh:/git.launchpad.net/~<MY_TEAM>/<MY_PROJECT>/+git/u-boot', PosixPath('/home/vagrant/aristo/baytown/classic22/gadget-snap/parts/u-boot/src')] exited with code 128.
"""

I am able to build the same gadget snap with 6.x/stable without issue

Thanks!

Tags: craft-1489
tags: added: craft-1489
Revision history for this message
Callahan Kovacs (mr-cal) wrote :

Hi @aristochen,

Thanks for the report. This is a regression introduced in snapcraft 7.

A fix has been committed and is scheduled to be release within the next week.

In the meantime, the workaround is to choose a single protocol (http, git, or ssh) instead of git+ssh

fix: https://github.com/canonical/craft-parts/pull/321

Changed in snapcraft (Ubuntu):
assignee: nobody → Callahan Kovacs (mr-cal)
status: New → Fix Committed
Revision history for this message
Callahan Kovacs (mr-cal) wrote :

This has been fixed and released as part of snapcraft 7.2.9.

Changed in snapcraft (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.