You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lazy specifies the GIT_SSH_COMMAND env argument, as far as I can tell in order to specify the -oBatchMode flag.
However, I have specified a GIT_SSH (basically equivalent to GIT_SSH_COMMAND for using plink.exe. The current method in lazy.nvim means all git (that uses ssh) commands fail as git cannot get the required keys (that plink provides).
Some solution ideas:
Check for if the env-args GIT_SSH_COMMAND / GIT_SSH are set, and if so do not overwrite - however git has the config options core.sshCommand and ssh.variant - though not sure what version of git they were added
Don't set, or make it an opt-in to set GIT_SSH_COMMAND - this way users are aware, and make an explicit choice.
IMO, the user should set this behaviour within git's config, rather than the tool - of course it helps to be aware to do it.
When trying to work out why lazy wasn't working for me, looking at the git source, the ssh_command detection / flags are a bit out-of-date, i.e. it does not specify either OpenSSH nor plink with the -BathMode=yes or -batch resepctively, but does explicit ly for tortoiseplink which I believe added -batch before plink. So perhaps the fix is really an issue for upstream git?
For other users with my somewhat esoteric setup, I set ssh.varianttortoiseplink and core.sshCommand to the plink executable within git config
Steps To Reproduce
Use windows
Configure Git to use plink.exe (putty) put in the env: GIT_SSH = C:\Program Files\PuTTY\plink.exe
Alternatively:
Set core.sshCommand to plink executable within git config
Expected Behavior
lazy.nvim to respect the GIT_SSH or GIT_SSH_COMMAND or related config options.
Repro
-- DO NOT change the paths and don't remove the colorschemelocalroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs({ "config", "data", "state", "cache" }) dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
"folke/tokyonight.nvim",
-- add any other plugins here
}
require("lazy").setup(plugins, {
root=root.."/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
The text was updated successfully, but these errors were encountered:
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.8.3 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Features: -acl +iconv +tui
Operating system/version
Windows 11
Describe the bug
Lazy specifies the
GIT_SSH_COMMAND
env argument, as far as I can tell in order to specify the -oBatchMode
flag.However, I have specified a
GIT_SSH
(basically equivalent toGIT_SSH_COMMAND
for usingplink.exe
. The current method inlazy.nvim
means all git (that uses ssh) commands fail as git cannot get the required keys (thatplink
provides).Some solution ideas:
GIT_SSH_COMMAND
/GIT_SSH
are set, and if so do not overwrite - however git has the config optionscore.sshCommand
andssh.variant
- though not sure what version of git they were addedGIT_SSH_COMMAND
- this way users are aware, and make an explicit choice.IMO, the user should set this behaviour within
git
's config, rather than the tool - of course it helps to be aware to do it.When trying to work out why lazy wasn't working for me, looking at the
git
source, thessh_command
detection / flags are a bit out-of-date, i.e. it does not specify eitherOpenSSH
norplink
with the-BathMode=yes
or-batch
resepctively, but does explicit ly fortortoiseplink
which I believe added-batch
beforeplink
. So perhaps the fix is really an issue for upstreamgit
?For other users with my somewhat esoteric setup, I set
ssh.variant
tortoiseplink
andcore.sshCommand
to theplink
executable within git configSteps To Reproduce
plink.exe
(putty) put in the env:GIT_SSH = C:\Program Files\PuTTY\plink.exe
Alternatively:
core.sshCommand
toplink
executable within git configExpected Behavior
lazy.nvim
to respect theGIT_SSH
orGIT_SSH_COMMAND
or related config options.Repro
The text was updated successfully, but these errors were encountered: