After modified the hugo theme I'm unable to deploy

Hi everybody, I excuse me in advance but i’m a newbie of netlify and hugo.

At first I succed in deply my site built with hugo, but then I made some edits at my hugo site on github and netlify started to be unable to deploy. Testing the site with an offline server it seems good. This is the last log.

11:42:00 PM: Build ready to start
11:42:02 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
11:42:02 PM: build-image tag: v3.4.1
11:42:02 PM: buildbot version: fcbc7a79f7372e5995cf02954ef19fc48d20c871
11:42:02 PM: Fetching cached dependencies
11:42:02 PM: Starting to download cache of 87.7MB
11:42:03 PM: Finished downloading cache in 1.226725196s
11:42:03 PM: Starting to extract cache
11:42:06 PM: Finished extracting cache in 2.874381354s
11:42:06 PM: Finished fetching cache in 4.124763896s
11:42:06 PM: Starting to prepare the repo for build
11:42:07 PM: Preparing Git Reference refs/heads/master
11:42:08 PM: Error fetching branch: https://github.com/jacksalici/new refs/heads/master
11:42:08 PM: Failing build: Failed to prepare repo
11:42:08 PM: Failed during stage 'preparing repo': exit status 1
11:42:08 PM: Finished processing build request in 5.908673005s

My site is this, but it is not updated since that i can’t deploy anymore.
Thank you in advance.

hey there, so the error message

11:42:08 PM: Failing build: Failed to prepare repo

means we are having trouble either connecting to github or cloning your repo onto our servers.

It’s likely something to do with this:

https://github.com/jacksalici/new refs/heads/master

my hunch is that the space in the branch name, or wherever “new refs” comes from isn’t something our system likes.

i can’t undestand where “new refs” came from… I mean,

https://github.com/jacksalici/new

is the repo, and the site is in the master branch, do you have any idea of what is the rest of

refs/heads/master

?

I can’t find any setting where i can edit that link…
Thank you so much

I’ve tried to uninstall the netlify app from github, reinstall it and clear cache before redeploy. The error seems to have changed.

3:14:55 PM: Build ready to start
3:14:58 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
3:14:58 PM: build-image tag: v3.4.1
3:14:58 PM: buildbot version: fcbc7a79f7372e5995cf02954ef19fc48d20c871
3:14:58 PM: Building without cache
3:14:58 PM: Starting to prepare the repo for build
3:14:59 PM: No cached dependencies found. Cloning fresh repo
3:14:59 PM: git clone https://github.com/jacksalici/new
3:15:00 PM: Preparing Git Reference refs/heads/master
3:15:02 PM: Error checking out submodules: Submodule ‘themes/hugo-theme-codex’ (GitHub - jakewies/hugo-theme-codex: A minimal blog theme for Hugo 🍜) registered for path 'themes/hugo-theme-codex’Cloning into ‘/opt/build/repo/themes/hugo-theme-codex’…fatal: remote error: upload-pack: not our ref 3736016ba99a0e446131f0137d6db8f8ae080b8afatal: the remote end hung up unexpectedlyFetched in submodule path ‘themes/hugo-theme-codex’, but it did not contain 3736016ba99a0e446131f0137d6db8f8ae080b8a. Direct fetching of that commit failed.
3:15:02 PM: Failing build: Failed to prepare repo
3:15:02 PM: Failed during stage ‘preparing repo’: Error checking out submodules: Submodule ‘themes/hugo-theme-codex’ (GitHub - jakewies/hugo-theme-codex: A minimal blog theme for Hugo 🍜) registered for path 'themes/hugo-theme-codex’Cloning into ‘/opt/build/repo/themes/hugo-theme-codex’…fatal: remote error: upload-pack: not our ref 3736016ba99a0e446131f0137d6db8f8ae080b8afatal: the remote end hung up unexpectedlyFetched in submodule path ‘themes/hugo-theme-codex’, but it did not contain 3736016ba99a0e446131f0137d6db8f8ae080b8a. Direct fetching of that commit failed.: exit status 1
3:15:02 PM: Finished processing build request in 4.129919241s

Hi @perry, sorry to bother you. Have you some advice about my last log?

Thank you and excuse me again.

Looks like you’re trying to use a submodule which doesn’t exist. Can you double-check this dependency?

this took me two days to figure out:
if your deploy is successful but the theme (with submodule) doesn’t show up, always look for the base URL in the config.toml file. either ** ** it or it should be the same as your Netlify site URL.

1 Like