node.js - 将hexo同时部署在github和coding上,hexo deploy发生错误
怪我咯
怪我咯 2017-04-17 14:45:17
0
2
633

hexo deploy,github能够正常的push文件,轮到coding时,则会报错。ssh检查过,github和coding都可以连接上

$ ssh -T git@github.com
Hi Zohar727! You've successfully authenticated, but GitHub does not provide shell access.
$ ssh -T git@git.coding.net
Hello zohar727! You've connected to Coding.net via SSH successfully!

配置文件信息:

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repo: 
        github: https://github.com/Zohar727/Zohar727.github.io.git,master
        coding: https://git.coding.net/zohar727/zohar727.git,master
        

报错信息(github正常push,coding报错):

bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://git.coding.net/': Invalid argument
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://git.coding.net/': Invalid argument

    at ChildProcess.<anonymous> (H:\前端开发\HEXO\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:37:17)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at ChildProcess.cp.emit (H:\前端开发\HEXO\node_modules\hexo-deployer-git\node_modules\hexo-util\node_modules\cross-spawn\lib\enoent.js:40:29)
    at maybeClose (internal/child_process.js:829:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
FATAL bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://git.coding.net/': Invalid argument

Error: bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://git.coding.net/': Invalid argument

    at ChildProcess.<anonymous> (H:\前端开发\HEXO\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:37:17)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at ChildProcess.cp.emit (H:\前端开发\HEXO\node_modules\hexo-deployer-git\node_modules\hexo-util\node_modules\cross-spawn\lib\enoent.js:40:29)
    at maybeClose (internal/child_process.js:829:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
        

配置文件信息那里做过很多尝试:
把https换成ssh 无效
把coding的分支换成 coding-pages 无效

怪我咯
怪我咯

走同样的路,发现不同的人生

全部回覆(2)
刘奇

這個問題可以換個思路,你用hexo backup這個插件應該就可以解決。

伊谢尔伦

我建議你還是建立兩個檔案倉庫比較好,一個github一個coding

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板