问题描述
今天早上,一如往常的往在github上创建的hexo博客上传文章,结果报错‘fatal: could not read Username for 'https://github.com': No error’
create mode 100644 2018/09/16/1537059562/index.html
fatal: TaskCanceledException 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/do cs/troubleshooting.html
Error: fatal: TaskCanceledException 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:\dev_github\blog\node_modules\hexo-util\lib\s pawn.js:37:17)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at ChildProcess.cp.emit (E:\dev_github\blog\node_modules\cross-spawn\lib\eno ent.js:40:29)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
真是奇怪了。昨天还好好的,今天就不行了,尝试了好多办法,最终尝试了一个。亲测可用
解决办法
- 修改配置文件:根目录下的_config.yml,修改deploy节点。
- 原来的配置为:
deploy:
type: git
repo: https://github.com/{yourname}/{yourname}.github.io.git
branch: master
- 修改为如下:
deploy:
type: git
repo: https://{yourname}:{yourpassword}@github.com/{yourname}/{yourname}.github.io.git
branch: master
如果大家也遇到这个问题,也可以尝试下,我的问题是这样解决的,今天周天,玩的开心