lazygit: Permission denied (public key) for hosted gitlab
Topic
I can’t use SSH to contact a git(lab) repository, but are forced to a https url as remote.
In Lazygit i’m unable to fetch or push data, because of authentication problem.
Permission denied (public key)
Your thoughts I would expect that at least I’m prompted to enter my passphare for my private key. That isn’t happening, so I assume that this is the reason why it fails. How does lazygit work with HTTPS git repostories? Can someone please help me?
Nice to have feaure: It would also be interesting in lazygit if it caches the password or the decrypted private key as long the process runs.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 17
I’m also facing the same issue. But it only happens on Windows, not macOS or Linux.
I found a solution for Windows 10!
Need to:
ssh-agent
(Set-Service ssh-agent -StartupType Automatic; Start-Service ssh-agent
)git config --global core.sshcommand "C:/Windows/System32/OpenSSH/ssh.exe
)ssh-add path/to/key
)https://poshsecurity.com/blog/using-the-openssh-client-included-in-windows-10-1809-as-your-gits-ssh-client
Please let me know if I can support you and provide further details.