jesseduffield / jesseduffield/lazygit

git.autoFetch option without SSH keys causes failed password SSH attempts; may trigger fail2ban

Open
#1,498 11 comments 1 reaction 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 I start lazygit it looks like it attempts to setup an SSH connection to the repo's origin. This frequently gets the client blocked, since the attempts fail

I see this in my auth.log on the server that hosts my repos:

Sep 28 14:31:13 reposerver sshd[23394]: Failed password for git from x.x.x.x port 60754 ssh2

**To Reproduce**

Client machine:
- has a git repo checked out with a remote origin like `remote.origin.url=git@repohost:reponame`
- has `repohost` defined in `~/.ssh/config` supplying the hostname, user and port (but no password - connection is by SSH key)

On the repohost machine, I ran `tail --follow /var/log/auth.log |grep $ip_of_client`

As soon as `lg` is started on the client I see two errors like the one above, followed by `Connection closed by authenticating user git x.x.x.x port 60754 [preauth]`

**Expected behavior**

LG not to make any SSH connections without being commanded to do so.

**Desktop (please complete the following information):**
- OS: GNU/Linux
- Lazygit Version 0.29

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.