hexo使用上传命令hexo g -d出现“”

hexo g -d报错

INFO  Start processing
INFO  Files loaded in 1.88 s
INFO  0 files generated in 238 ms
INFO  Deploying: git
INFO  Clearing .deploy_git folder...
INFO  Copying files from public folder...
INFO  Copying files from extend dirs...
On branch master
nothing to commit, working tree clean
git@e.coding.net: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: Spawn failed
    at ChildProcess.<anonymous> (/Users/chaofeng/Documents/blog/node_modules/hexo-util/lib/spawn.js:51:21)
    at ChildProcess.emit (events.js:311:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)

网上的都是说重新添加密钥,一般情况下可以解决问题,但是我这块不行,我得这么来才可以。如下所示

1.执行   eval `ssh-agent`
2.执行   ssh-add ~/.ssh/id_rsa
3.执行   ssh-add –l
4.重新尝试连接  ssh -T git@e.coding.net

就可以了。

原文地址:https://www.cnblogs.com/FengGeBlog/p/12654521.html