昨天博客突然不能部署,执行hexo d -g出现报错:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fatal: HttpRequestException encountered.
��������ʱ�����
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: fatal: HttpRequestException encountered.
��������ʱ������
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error

at ChildProcess.<anonymous> (E:\AresX's Blog\node_modules\hexo-util\lib\spawn.js:37:17)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at ChildProcess.cp.emit (E:\AresX's Blog\node_modules\cross-spawn\lib\enoent.js:40:29)
at maybeClose (internal/child_process.js:891:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

执行hexo d会出现github的界面要求输入用户名密码,输入完了之后还是这样

解决方法:

编辑_config.yml

找到: #Deployment

在repo中加入用户名和密码

1
2
3
4
deploy:
type: git
repo: https://<用户名>:<密码>@github.com/ares-x/ares-x.github.io.git
branch: master

2018-02-27
Contents

⬆︎TOP