← Back to issue list

SCP formatted git source cause infinite loading when packing

View original Github issue

Metadata

Project
craft-parts
Number
#1058
Type
issue
State
open
Author
alesancor1
Labels
Created
2025-04-02 10:50:30+00:00
Updated
2025-04-02 10:51:16+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Bug Description When trying to use a SCP formatted string as the `source` with `git` as the `source-type`, it hangs during pull stage. This happen when the clone operation is expected to fail, for example: ```yaml source-type: git source: github.com:user/repo ``` will cause an infinite loading, while running `git clone github.com:user/repo` on the host will produce the following error: ``` Cloning into 'repo'... user@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` I would expect `pack` operation to fail as well, since the `source` repo could not be cloned due to permission error. > [!NOTE] > All the [git url formats](https://git-scm.com/docs/git-clone#_git_urls) are expected to work, according to the comment here: https://github.com/canonical/craft-parts/blob/c3104da15e84f103f0a62549edfd660b2c2cb295/craft_parts/sources/git_source.py#L309-L317 ### To Reproduce Tested with `Rockcraft`, using this `rockcraft.yaml`: ```yaml name: git-test version: "latest" summary: test-git-source description: test git source base: bare build-base: ubuntu@24.04 platforms: amd64: parts: test: plugin: nil source-type: git source: github.com:alesancor1/api-requester ``` Then running `rockcraft pack` ### part yaml ```shell parts: test: plugin: nil source-type: git source: github.com:alesancor1/api-requester ``` ### Relevant log output ```shell Starting rockcraft, version 1.9.0.post5+gadb3031.d20250319 Logging execution to '/home/alex/.local/state/rockcraft/log/rockcraft-20250402-124504.680382.log' Launching managed ubuntu 24.04 instance... Creating instance from base instance Starting instance Starting rockcraft, version 1.9.0.post5+gadb3031.d20250319 Logging execution to '/tmp/rockcraft.log' Extracting bare:latest Extracted bare:latest Initialising lifecycle Installing build-packages Pulling pebble The authenticity of host 'github.com (140.82.121.4)' can't be established. ED25519 key fingerprint is SHA256:+DiYvvV6TuJJhbF/zDA0zPMSvHdkr4UvCOqU. This key is not known by any other names. Pulling test / (326.0s) ```

Evaluation history

No evaluation history available.