[英]Identity fie in GIT_SSH_COMMAND for Windows not accessible
这个命令对我不起作用。 我需要将 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
我使用linux风格的路径使它工作
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
请注意&&
之前缺少空格:它避免在前一个命令中添加额外的空格,这有时可能会出现问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.