Git Pull Failed. Custom sshCommand
- Vorherrschende Sprache
- Rust
- Sterne
- 22.5k
- Forks
- 773
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**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

Beitragsleitfaden
Rechercherichtung
Start with the .git/config example and the pull request path logged at asyncgit/src/pull.rs:75, then inspect the SSH credential callback shown in the log. Reproduce the pull using core.sshCommand and compare it with the working terminal and fetch behavior. Done means GitUI pulls the repository successfully with the configured custom SSH command.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git, rust
- Bereich
- cli
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100