2

我已经在这个网站上查看了我的问题,但我没有找到解决方案。

我的所有工作都在github上,但是我的hugo 主题有问题。它是Hugo-Initio的分支,我想用它在 netlify 上发布我的博客,但我有一个问题。

3:33:45 PM: Build ready to start
3:33:48 PM: Fetching cached dependencies
3:33:48 PM: Starting to download cache of 53.5MB
3:33:49 PM: Finished downloading cache in 521.502937ms
3:33:49 PM: Starting to extract cache
3:33:50 PM: Finished extracting cache in 1.647501032s
3:33:51 PM: Finished fetching cache in 2.284751664s
3:33:51 PM: Starting to prepare the repo for build
3:33:51 PM: Preparing Git Reference refs/heads/hugo-initio
3:33:53 PM: Error checking out submodules: error: Server does not request for unadvertised object 43ea09ddf565af64ccf248ba68447745e158cc3d
Fetched in submodule path 'themes/hugo-initio', but it did not contain 43ea09ddf565af64ccf248ba68447745e158cc3d. Direct fetching of that commit failed.
3:33:53 PM: Failing build: Failed to prepare repo
3:33:53 PM: failed during stage 'preparing repo': Error checking out submodules: error: Server does not allow request for unadvertised object 43ea09ddf565af64ccf248ba68447745e158cc3d
Fetched in submodule path 'themes/hugo-initio', but it did not contain 43ea09ddf565af64ccf248ba68447745e158cc3d. Direct fetching of that commit failed. 
: exit status 1
3:33:53 PM: Finished processing build request in 5.867246119s

我已经尝试了很多东西,但我仍然卡住了。

4

1 回答 1

1

这是由于没有 .gitmodules 设置而从不同的 repo 上传的主题解决方案:

  1. 如果是你自己的自定义主题,你需要删除 .git 文件并重新上传项目到 repo,确保所有主题文件提交和推送。

  2. 如果您使用来自不同 repo 的主题,您需要为此编写设置,触摸 .gitmodules,然后像这样添加:

    [submodule "themes/hugo-tranquilpeak-theme"]
        path = themes/hugo-tranquilpeak-theme
        url = url_repo_here
    
于 2018-11-16T19:07:09.640 回答