suchen

Heim  >  Fragen und Antworten  >  Hauptteil

node.js - 将hexo同时部署在github和coding上,hexo deploy发生错误

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 无效

怪我咯怪我咯2776 Tage vor629

Antworte allen(2)Ich werde antworten

  • 怪我咯

    怪我咯2017-04-17 14:47:17

    这个问题可以换个思路,你用hexo backup这个插件应该就可以解决。

    Antwort
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 14:47:17

    我建议你还是创建两个文件仓库比较好,一个github一个coding

    Antwort
    0
  • StornierenAntwort