本文最后更新于 401 天前,其中的信息可能已经有所发展或是发生改变。
参考文章:https://community.bitwarden.com/t/ssh-agent-native-support-for-ssh-agent-in-wsl/83831/5
很简单,把这几句加到 .bashrc 文件的开头(或结尾,或直接 /etc/profile.d/*.sh,但这样使用 JetBrains Gateway 的时候就不能访问到了,其他不受影响):
alias ssh='ssh.exe'
git config --global core.sshCommand "ssh.exe"
alias ssh-add='ssh-add.exe'
alias scp='scp.exe'
alias sftp='sftp.exe'