不可能用我的雨果主题在netlify上建立我的雨果博客

ff29svar  于 2022-09-21  发布在  Git
关注(0)|答案(1)|浏览(174)

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

我所有的工作都在github上,我的hugo theme有问题。它是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

我试了很多方法,但还是卡住了。

inn6fuwd

inn6fuwd1#

这是由于不同的repo上传的主题没有.git模块设置所致。解决方案:

1.如果是您自己的自定义主题,需要删除.git文件并重新上传项目重新回购,请确认所有主题文件提交和推送的内容。
1.如果您使用来自不同repo的主题,则需要为此编写设置,触摸.git模块,然后添加如下内容:

[submodule "themes/hugo-tranquilpeak-theme"]
    path = themes/hugo-tranquilpeak-theme
    url = url_repo_here

相关问题