【发布时间】:2020-12-18 04:26:07
【问题描述】:
这个命令对我不起作用。我需要将 tmp 身份文件传递给 ssh (git):
set "GIT_SSH_COMMAND=ssh -o StrictHostKeyChecking=no -F /dev/null -o IdentitiesOnly=yes -i C:\Users\some_user\AppData\Local\Temp\git-ssh-key" & git clone git@some_repo.git
我收到警告:
Identity file C:Userssome_userAppDataLocalTempgit-ssh-key not accessible: No such file or directory.
当我在身份文件路径中尝试双反斜杠时,出现错误:
debug1: Trying private key: C:\\Users\\assorvin\\AppData\\Local\\Temp\\git-ssh-key Load key "C:\\Users\\some_user\\AppData\\Local\\Temp\\git-ssh-key": invalid format
【问题讨论】:
-
用转义引号包围路径怎么样?
-c \"C:\Users\some_user\AppData\Local\Temp\git-ssh-key\" " -
同样的结果:不可访问:没有这样的文件或目录
-
使用正斜杠怎么样?