/c/Users/Dragon Liu/.ssh/config: line 5: Bad configuration option: password /c/Users/Dragon Liu/.ssh/config: terminating, 1 bad configuration options fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists. [41mFATAL[49m Something's wrong. Maybe you can find the solution here: [4mhttps://hexo.io/docs/troubleshooting.html[24m [33mError: Spawn failed at ChildProcess.<anonymous> (E:\01 Blog_work\Hexo-Blog\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:51:21) at ChildProcess.emit (events.js:200:13) at ChildProcess.cp.emit (E:\01 Blog_work\Hexo-Blog\node_modules\hexo-deployer-git\node_modules\cross-spawn\lib\enoent.js:34:29) at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)[39m
2 解决
2.1 情况1
ssh -T git@github.com 测试无法连接:
1 2 3
E:\01 Blog_work\Hexo-Blog>ssh -T git@github.com C:\\Users\\Dragon Liu/.ssh/config: line 5: Bad configuration option: password C:\\Users\\Dragon Liu/.ssh/config: terminating, 1 bad configuration options
原因是之前vscode下载插件Remote - SSH时配置了此文件:
删除config文件即可测试成功:
1 2 3
E:\01 Blog_work\Hexo-Blog>ssh -T git@github.com Warning: Permanently added the ECDSA host key for IP address '140.82.112.3' to the list of known hosts. Hi Dragonliu2018! You've successfully authenticated, but GitHub does not provide shell access.
E:\01 Blog_work\Hexo-Blog-Algorithm>ssh -T git@gitee.com Warning: Permanently added the ED25519 host key for IP address '180.97.125.228' to the list of known hosts. git@gitee.com: Permission denied (publickey).
E:\01 Blog_work\Hexo-Blog-Algorithm>ssh -T git@gitee.com Hi [36;01mDragon-Liu[0m! You've [32msuccessfully[0m authenticated, but GITEE.COM does not provide shell access.