我在使用github创建博客时有疑问



运行时hexo d在Git Bash中它跳了出来:


fatal: repository 'https://github.com/rippleQAQ/rippleQAQ.github.io.git/' not found
FATAL {
err: Error: Spawn failed
at ChildProcess.<anonymous> (C:UsersHCCDesktopblogmyblognode_moduleshexo-utillibspawn.js:51:21)
at ChildProcess.emit (node:events:513:28)
at cp.emit (C:UsersHCCDesktopblogmyblognode_modulescross-spawnlibenoent.js:34:29)
at ChildProcess._handle.onexit (node:internal/child_process:291:12) {
code: 128
}
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

rippleQAQ是我的github名称,我创建了一个名为rippleQAQ.github.io和SSH密钥的存储库

我的_config.yml是:

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: git
repo: https://github.com/rippleQAQ/rippleQAQ.github.io.git
branch: master

我需要一些帮助。非常感谢。

我一次又一次地尝试删除和重新创建我的github存储库。和change_config.yml。但这没有用。

如Hexo:GitHub Pages中所述,如果你走项目页面路线(与GitHub Action相反(,你需要:

  1. 在GitHub上导航到您的repo。转到"设置"选项卡。更改存储库名称,以便您的博客可以在username.github.io/repository上使用,存储库可以是任何名称,如博客或hexo
  2. 编辑您的_config.yml,将url:value更改为https://username.github.io/repository
  3. 提交并推送到默认分支
  4. 部署完成后,可以在存储库的gh-pages分支中找到生成的页面
  5. 在GitHub repo的设置中,导航到Settings > Pages > Source。将分支更改为gh-pages并保存
  6. 查看username.github.io/repository的网页

意思是:你需要手动添加、提交和推送你的代码到主分支(而不是master,自2020年10月以来(

您的_config.yml应该使用gh-pages分支。

deploy:
type: git
repo: https://github.com/<username>/<project>
# example, https://github.com/hexojs/hexojs.github.io
branch: gh-pages

相关内容

最新更新