Hexo d- Permission denied(publickey)

来源:互联网 发布:线切割锥度编程软件 编辑:程序博客网 时间:2024/05/16 06:19

问题

hexo deploy 出现错误,如下:

Permission denied(publickey)

Error: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

寻找解决方式

1. 核查我的公钥

我确认我的公钥是没问题的,而且之前也可也成功 push 到 github 上。

此外我通过 ssh -vT git@github.com 进行测试没问题。

显示的是:

Hi jrhu05! You’ve successfully authenticated, but GitHub does not
provide shell access.

debug1: channel 0: free: client-session, nchannels 1

Transferred: sent 3244, received 1776 bytes, in 0.6 seconds

Bytes per second: sent 5263.9, received 2881.8

debug1: Exit status 1

2. 核查git地址(支持SSH)

deploy:   type: git  repo: git@github.com:Deen/deen120.github.io.git  branch: master

进行完上面两步后,都没问题,然而问题并没有解决。

真正的解决方式

然后,这样居然成功了。

git bash

在git bash 中运行成功。

什么鬼,orz。
cmd 和git bash 会出现不同结果,未查到原因,求大神解答。


附:linux 下相同问题的一个解决方法。
https://www.v2ex.com/t/280562

0 0