Skip to content

remote-build: status indicator blocks interactive input #1101

Description

@steinbro

Bug Description

When connecting to Launchpad from a new machine or when SSH keys are not properly configured, the git command invoked by remote-build for a private build may request interactive input that the user can't interact with. Worse, the progress indicator starts counting as if progress is being made, and doesn't stop until the user presses enter.

$ snapcraft remote-build --build-for amd64 --project my-private-project
remote-build is experimental and is subject to change. Use with caution.
The authenticity of host 'git.launchpad.net (185.125.188.189)' can't be established.
RSA key fingerprint is SHA256:UNOzlP66WpDuEo34Wgs8mewypV0UzqHLsIFoqwe8dYo.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/Starting new build. It may take a while t… | (50.3s)

To Reproduce

  1. Remove git.launchpad.net from ~/.ssh/known_hosts, if present.
  2. Run snapcraft remote-build --project <some_private_project>

part yaml

Relevant log output

2026-06-24 14:31:02.477 Starting new build. It may take a while to upload large projects.
2026-06-24 14:31:04.079 Using ssh url for private repository: ParseResult(scheme='git+ssh', netloc='dsteinbrook@git.launchpad.net', path='/~dsteinbrook/[redacted]/+git/snapcraft-[redacted]-7175af0a5002d640bcf58df31dfcebf4', params='', query='', fragment='')
2026-06-24 14:31:04.080 Resolved reference 'refs/heads/work/CRAFT-5148/craft-sdk-snap' for name 'HEAD'
2026-06-24 14:31:04.080 Pushing 'HEAD' to remote 'git+ssh://dsteinbrook@git.launchpad.net/~dsteinbrook/[redacted]/+git/snapcraft-[redacted]-7175af0a5002d640bcf58df31dfcebf4' with refspec 'refs/heads/work/CRAFT-5148/craft-sdk-snap:refs/heads/main'.
2026-06-24 14:31:14.400 Git operation failed with: Could not push 'HEAD' to 'git+ssh://dsteinbrook@git.launchpad.net/~dsteinbrook/[redacted]/+git/snapcraft-[redacted]-7175af0a5002d640bcf58df31dfcebf4' with refspec 'refs/heads/work/CRAFT-5148/craft-sdk-snap:refs/heads/main' for the git repository in '/home/daniel.steinbrook@canonical.com/.cache/snapcraft/remote-build/snapcraft-[redacted]-7175af0a5002d640bcf58df31dfcebf4/repo'.
2026-06-24 14:31:14.401 Traceback (most recent call last):
2026-06-24 14:31:14.401   File "/snap/snapcraft/18124/lib/python3.12/site-packages/craft_application/services/remotebuild.py", line 295, in _ensure_repository
2026-06-24 14:31:14.401     local_repository.push_url(push_url.geturl(), "main", push_tags=True)
2026-06-24 14:31:14.401   File "/snap/snapcraft/18124/lib/python3.12/site-packages/craft_application/git/_git_repo.py", line 531, in push_url
2026-06-24 14:31:14.401     raise GitError(
2026-06-24 14:31:14.401 craft_application.git._errors.GitError: Git operation failed.
2026-06-24 14:31:14.401 For more information, check out: https://documentation.ubuntu.com/snapcraft/9.0.0/explanation/remote-build
2026-06-24 14:31:14.401 Full execution log: '/home/daniel.steinbrook@canonical.com/.local/state/snapcraft/log/snapcraft-20260624-143058.434420.log'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions