gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Can't push virtual branch: mismatched host key

Open kemitix opened this issue 2 years ago • 1 comments

I get the follow error logged when I try to push a virtual branch:

2024-02-14T10:48:20.141388Z ERROR push_virtual_branch: gitbutler-app/src/project_repository/repository.rs:467: error=failed to check known host                                                
                                                                                                                                                                                               
Caused by:                                                                                                                                                                                     
    mismatched host key project_id="b90f2a4f-79e4-4e17-85e9-b74660dcbd91" branch_id="14d4e2c5-040d-4144-911e-8bd99bbeb3ab" with_force=false

Git authentication is set to auto-detect. Have tried specifying the key directly, with no difference.

Git from the CLI works, even with StrictHostKeyChecking yes configured in my ~/.ssh/config file.

kemitix avatar Feb 14 '24 10:02 kemitix

@mtsgrd Are there any plan to fix this issue 🙏

WoodcoHurri avatar Mar 04 '24 12:03 WoodcoHurri

I'm running into the same error. I'm trying to push branches to gitlab.com; the host key seems to be in ~/.ssh/known_hosts, and I've even tried re-adding it.

jamesharr avatar Apr 17 '24 23:04 jamesharr

In the Setting I've changed Git Authentication to "Use Git executable". I don't know what the downsides are for this, but it works.

To1ne avatar Apr 26 '24 13:04 To1ne

Yes, if you're running into this it's best to use Git Executable from the auth settings, which is now the default.

Going to close this for now as that's currently the only way to get the strict host key checking to work reliably. Let me know here if that still doesn't work for you!

Qix- avatar Apr 30 '24 13:04 Qix-