网站错误解决日志

时间

时间 2015-04-14 11:10:43

问题描述

今天使用 hexo 部署到 git 的时候,报错:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '/Users/katsura/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /Users/katsura/.ssh/id_rsa
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

at ChildProcess.<anonymous> (/Users/katsura/Git/guiqingblog.github.io/node_modules/hexo-deployer-git/node_modules/hexo-util/lib/spawn.js:42:17)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Socket.<anonymous> (child_process.js:979:11)
at Socket.emit (events.js:95:17)
at Pipe.close (net.js:466:12)

几个尝试

有印象关于 id_rsa 这个 key 的,就是昨天把它加到了 key chain 当中.于是尝试删除,仍然报错.

问题解决

仔细查看报错的信息

1
Permissions 0777 for '/Users/katsura/.ssh/id_rsa' are too open.

想到今天早上曾经为了模拟器的原因,把整个 User目录的权限改成了 777 …

于是,终端输入:

1
Permissions 0777 for '/Users/katsura/.ssh/id_rsa' are too open.

问题解决

思考

以后切不可为了省事做一些大面积的修改工作.对哪个文件就是对哪个文件!