當我在 Git Bash 中運行 hexo d 時,它跳了出來:
fatal: repository 'https://github.com/rippleQAQ/rippleQAQ.github.io.git/' not found
FATAL {
err: Error: Spawn failed
at ChildProcess.<anonymous> (C:\Users\HCC\Desktop\blog\myblog\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (node:events:513:28)
at cp.emit (C:\Users\HCC\Desktop\blog\myblog\node_modules\cross-spawn\lib\enoent.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
ippleQAQ 是我的 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 存盤庫。然后更改 _config.yml。但它沒有用。
uj5u.com熱心網友回復:
如Hexo: GitHub Pages中所述,如果您使用專案頁面路線(而不是 GitHub Action),您需要:
- 導航到 GitHub 上的存盤庫。轉到設定選項卡。更改存盤庫名稱,以便您的博客在 中可用
username.github.io/repository,存盤庫可以是任何名稱,例如 blog 或 hexo。 - 編輯您的
_config.yml,將 url: 值更改為https://username.github.io/repository. - 提交并推送到默認分支。
- 部署完成后,可以在
gh-pages存盤庫的分支中找到生成的頁面。 - 在 GitHub 存盤庫的設定中,導航到
Settings > Pages > Source. 將分支更改為gh-pages并保存。 - 檢查網頁
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
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/526676.html
標籤:github博客
