gitui-org / gitui-org/gitui

Freeze on pull/fetch on Windows with ssh-agent

Open
#2,791 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
22.5k
Forks
773
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
gitui freezes on fetch at 0% and breaks ssh-agent.

**To Reproduce**
1. In .bashrc:
```
eval `ssh-agent -s`
ssh-add ~/.ssh/github
ssh-add ~/.ssh/bitbucket
```
2. Open git bash in a (large) repository
3. (optional) run `git fetch` to check that it works
4. Open gitui
5. Try to fetch
6. Wait....
7. Become impatient after a few minutes and hit Ctrl + C (only way to abort this I found)
8. Try to run `git fetch` in bash. -> fails with "Permission denied (publickey)"

**Expected behavior**
Should fetch within a few seconds.

**Context (please complete the following information):**
- OS/Distro + Version: Windows 11
- GitUI Version: 0.27.0 2025-01-14 (99f6967) (version from Chocolatey)
- Git for Windows: 2.52.0

**Additional context**
- 'ssh-add -L' reports "Error connecting to agent: Bad file descriptor" after killing gitui.
- Happens with all github and bitbucket repositories I tried (including gitui) as long as they use ssh and not https.
- I tried to see if ssh-agent would log anything by running `ssh-agent -d -s` and manually pointing SSH_AUTH_SOCK to the file from the agent in another terminal. For `git fetch` ssh-agent would output something, but for fetching in gitui it's completely silent.
- I did not try to push but I would assume it has similar issues.
- If I wait long enough on a fetch the progress dialog will be gone. ssh-agent will still be broken though.
- If I wait long enough on a pull I'm getting this error: "git error:error authenticating: agent list id failed; class=Ssh (23)"

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.