jesseduffield / jesseduffield/lazygit

Lazygit hangs without displaying SSH host verification prompt when pushing to a new repository

Open
#4,057 0 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**
When trying to push to a repository without verifying its identity, Lazygit becomes unresponsive and does not show an error or prompt to accept the SSH host verification. Lazygit does not respond to the prompt about connecting to a new host identity and remains stuck.

**To Reproduce**
Steps to reproduce the behavior:
1. Delete key record from `~/.ssh/known_hosts`
2. Open Lazygit.
3. Attempt to push to a GitHub repository (or any repository) for the first time, without the host identity being pre-verified.
4. Lazygit fails to display the expected SSH prompt, which should ask to verify the authenticity of the host.

**Expected behavior**
Lazygit should display the SSH prompt, asking if the user wants to connect to the unknown host, similar to how it appears in a standard terminal, or show an error:
```The authenticity of host 'github.com (140.82.121.3)' can't be established. ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])?```
After confirmation, the push should proceed.

**Screenshots**
Screenshot 2024-11-12 at 8 26 06 pm

**Version info:**
- Lazygit version: `commit=e1e4e1be1fb6d0757b2f8590e55aca2738e9f9bd, build date=2024-11-12T06:00:58Z, build source=unknown, version=e1e4e1be, os=darwin, arch=amd64, git version=2.39.5 (Apple Git-154)`
- Git version: `git version 2.39.5 (Apple Git-154)`

**Additional context**
This issue blocks the user from completing the push operation in Lazygit when attempting to push to a new, previously unrecognized host.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.