gitui-org / gitui-org/gitui

Git Pull Failed. Custom sshCommand

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

Description

**Describe the bug**

Error pulling repo with custom ssh command.
The error does not happen when fetching the repo Shift + F

There is no issue pulling repo directly in the terminal.

```
.git/config

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
sshCommand = ssh -o IdentitiesOnly=yes -i ~/.ssh/id_ed25519 -F /dev/null
[remote "origin"]
url = git@gitlab.com:my-username/dotfiles.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
remote = origin
merge = refs/heads/main
[user]
name = My Name
email = my@email.com

```

```
Log

cat $HOME/.cache/gitui/gitui.log
21:19:42 [TRACE] (1) gitui::app: [src/app.rs:121] open repo at: RefCell { value: Path(".") }
21:19:42 [TRACE] (6) mio::poll: [/build/gitui-0.23.0-vendor.tar.gz/mio/src/poll.rs:532] registering event source with poller: token=Token(0), interests=READABLE
21:19:42 [TRACE] (6) mio::poll: [/build/gitui-0.23.0-vendor.tar.gz/mio/src/poll.rs:532] registering event source with poller: token=Token(1), interests=READABLE
21:19:42 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 3458105169925372201] (type: WorkingDir)
21:19:42 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 12190499241804015199] (type: Stage)
21:19:42 [TRACE] (1) gitui: [src/main.rs:222] app start: 43 ms
21:19:42 [TRACE] (1) gitui::app: [src/app.rs:494] update
21:19:42 [TRACE] (4) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 12190499241804015199 (type: Stage)
21:19:42 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:96] request blocked, still pending
21:19:42 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 2033313883860962823] (type: Stage)
21:19:42 [TRACE] (3) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 3458105169925372201 (type: WorkingDir)
21:19:42 [TRACE] (2) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 2033313883860962823 (type: Stage)
21:19:42 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Branches)
21:19:42 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)
21:19:42 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)
21:19:42 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)
21:19:44 [TRACE] (1) gitui::app: [src/app.rs:397] event: Input(Key(KeyEvent { code: Char('f'), modifiers: NONE, kind: Press, state: NONE }))
21:19:44 [TRACE] (1) asyncgit::pull: [asyncgit/src/pull.rs:75] request
21:19:44 [TRACE] (1) gitui::app: [src/app.rs:494] update
21:19:44 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 3818811920977110431] (type: WorkingDir)
21:19:44 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 10747686546171081217] (type: Stage)
21:19:44 [TRACE] (3) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 10747686546171081217 (type: Stage)
21:19:44 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)
21:19:44 [TRACE] (2) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 3818811920977110431 (type: WorkingDir)
21:19:44 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)
21:19:44 [DEBUG] (7) asyncgit::sync::remotes::callbacks: creds: 'git@gitlab.com:my-username/dotfiles.git' Some("git") (SSH_KEY | SSH_MEMORY | SSH_CUSTOM)
21:19:44 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Pull)
21:19:44 [ERROR] fetch error: git error:remote:
remote: ========================================================================
remote:
remote: ERROR: The project you were looking for could not be found or you don't have permission to view it.

remote:
remote: ========================================================================
remote:
; class=Ssh (23); code=Eof (-20)
21:19:44 [TRACE] (1) gitui::app: [src/app.rs:494] update
21:19:44 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 18358187283236456657] (type: WorkingDir)
21:19:44 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 18251681766302141857] (type: Stage)
21:19:44 [TRACE] (4) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 18251681766302141857 (type: Stage)
21:19:44 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Pull)
21:19:44 [TRACE] (2) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 18358187283236456657 (type: WorkingDir)
21:19:44 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)
21:19:44 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)
21:19:47 [TRACE] (1) gitui::app: [src/app.rs:494] update
21:19:47 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 13725314938134405751] (type: WorkingDir)
21:19:47 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 13161132352443046205] (type: Stage)
21:19:47 [TRACE] (3) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 13161132352443046205 (type: Stage)
21:19:47 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)
21:19:47 [TRACE] (2) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 13725314938134405751 (type: WorkingDir)
21:19:47 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)
21:19:52 [TRACE] (1) gitui::app: [src/app.rs:494] update
21:19:52 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 14044935946799830876] (type: WorkingDir)
21:19:52 [TRACE] (1) asyncgit::status: [asyncgit/src/status.rs:102] request: [hash: 9310137054696458134] (type: Stage)
21:19:52 [TRACE] (3) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 9310137054696458134 (type: Stage)
21:19:52 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)
21:19:52 [TRACE] (2) asyncgit::status: [asyncgit/src/status.rs:160] status fetched: 14044935946799830876 (type: WorkingDir)
21:19:52 [TRACE] (1) gitui::app: [src/app.rs:514] update_async: Git(Status)

```

**To Reproduce**
Steps to reproduce the behavior:
1) Open existing repo
2) update .git/config to use a custom ssh key
3) pull repo

**Expected behavior**
Pull the repo without an error

**Context (please complete the following information):**
- OS: NixOS 23.05
- GitUI Version 0.23.0

![fetch_failed_via_gitui](https://github.com/extrawurst/gitui/assets/35124080/43b42baf-9d31-45b9-81d0-d5c7a3e92b93)

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.