我想使用config来设置sshCommand而不是环境变量。但是不起作用 这是发生的事情
localhost
在调试时,它不使用core.sshCommand
中的值user
版本
➜ GIT_SSH_COMMAND='ssh -i /var/www/level2.lu/www/git_id_rsa -F /dev/null' git ls-remote
From git@github.com:syn2cat/Level2.lu.git
fcaa5a2e63499568dd916e7b18f950b311781bd0 HEAD
fcaa5a2e63499568dd916e7b18f950b311781bd0 refs/heads/master
a542061a64d3698d5da54d63456b26932fe549a2 refs/pull/1/head
➜ git config core.sshcommand
ssh -i /var/www/level2.lu/www/git_id_rsa -F /dev/null
➜ git ls-remote
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.