問題描述
今天早上,一如往常的往在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
如果大家也遇到這個問題,也可以嘗試下,我的問題是這樣解決的,今天周天,玩的開心