Posted onEdited onInSite
,
HexoViews: Word count in article: 1.4kReading time ≈1 mins.
Hexo FAQs
Hexo Deploy
Suddenly hexo deploy encountered a strange problem. During this period of time, the deployment-related code has not been modified.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
$ hexo deploy To github.com:CloudoLife/col-hexo-CloudoLife.github.io.git ! [remote rejected] HEAD -> main (bad ref) error: failed to push some refs to 'github.com:CloudoLife/col-hexo-CloudoLife.github.io.git' FATAL { err: Error: Spawn failed at ChildProcess.<anonymous> (/home/runner/work/col-hexo-CloudoLife/col-hexo-CloudoLife/node_modules/hexo-util/lib/spawn.js:51:21) at ChildProcess.emit (events.js:315:20) at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) { code: 1 } } Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! [email protected] deploy: `hexo deploy --config _config.yml,_overrideconfig.yml` npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the [email protected] deploy script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
It may be caused by unsuccessful branch push, change deploy to another branch(such from main to master) to resolve it.