Can't clone from git -error 128 but permissions etc seem ok and no webhooks setup

Hi,
I’m trying to deploy a jekyll site I copied from another of my projects into its own GIT hub repo.
I have all the admin privileges on github and have successfully linked with netlify but when it comes to deploy I get a 128 error.
I’ve checked there are no webhooks and have checked the permissions on github. Ive tried reconnecting with the repository. None of it resolves the problem.

Could you advise what else I can do?

The deploy is here:
Netlify App

The log is this:
1:21:43 PM: Build ready to start
1:21:45 PM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
1:21:45 PM: build-image tag: v3.3.5
1:21:45 PM: buildbot version: eb060c4dc3a8a73f9004f460f04632708166ca51
1:21:45 PM: Fetching cached dependencies
1:21:45 PM: Failed to fetch cache, continuing with build
1:21:45 PM: Starting to prepare the repo for build
1:21:45 PM: No cached dependencies found. Cloning fresh repo
1:21:45 PM: git clone GitHub - risingphoenixtc/shibashi
1:21:47 PM: Error cloning repository: GitHub - risingphoenixtc/shibashi
1:21:47 PM: Failing build: Failed to prepare repo
1:21:47 PM: failed during stage ‘preparing repo’: exit status 128
1:21:47 PM: Finished processing build request in 2.000203762s

For that site, there will be no webhooks - it’s our Github app that controls access. Can you check this URL to see if the app is pending approval?

Thank you for the screenshot! I did some research and it looks like this is a large media issue. Take a look at this troubleshooting guide to make sure your configuration is correct: [Support Guide] Troubleshooting your Netlify Large Media Configuration

Let us know if that helps!

Hi Laura,

I fiddled with the large media config and the build worked but the large media files do not display.
I’m assuming it is some error from cloning the repository into the new site but I’m stuck as to what to do.
I’ve got pointers in the repo but I don’t have files. I think there is some mixup between where the pointers are popinting and the large media storage.
Can you advise how I can get the large media images from the source project into the new project?
Thanks.

Hi,

Once you enable large media on a repo, it’s attached to a single site. If you link that same repo to another site then you won’t get the files there. You’ll have to remove large media and git lfs from that repo and set it up again for the second site if you want it to work there, though doing so will stop it from working on the first site.

Hi,
Thanks for replying.
I’m a bit confused by your response, could you help me understand.

I want largemedia working on 2 sites but your email reads that if I disable it on site 2 it will disable it in site 1 also.

That doesn’t sound right so I’m guessing I’ve misunderstood.

Could you help me understand what the individual steps are that I need to take to have separate large media storage working for my 2 separate sites?

Many thanks,

Paul

I think what futuregerald is saying is that if you enable Large Media in your repository, you can only use it on one site. Trying to use it on 2 sites will not work. If you want to change the site that the repo is configured on, you’ll need to remove Large Media and Git LFS altogether and set it up to the second site from scratch (which also removes it from the first site). Hope that helps clarify things.

Hi Dennis,

Thanks for replying and sorry not o tcome back to you sooner, I had to park this after xmas but am focussed on it now.
It doesn’t actually make sense to me but I’m sure that is me misunderstanding.
If I have a github hosted site running large media and netlify cms, what are the steps I need to take to be able to copy that site so it functions as a totally seperate site in its own github project and own netlify account WITH large media working without it disprupting site 1.

Basically I want to clone site 1 but how do I do that with large media?

I just want to use the 1st site as a base template that I can then further edit. I need to be able to edit both sites locally on my laptop and have the push to different github repos and have seperate large media stores work for each.

Sorry to get basic but I feel I need you to state these basics so that I know I’m not missing something simple.

Currently I’ve cloned site 1 into repo for site 2, connected site 2 to the site 2 netlify account, edited the content etc and pushed. It didn’t deploy due to the large media config for site 2 referring to the large media storage for site 1. I changed this so it deployed BUT no images show.(see here https://elated-cray-828610.netlify.com/) I figure that is because site 2 has pointers, NOT the actual files and the pointers aren’t working because they are site 1 pointers.

So am I better starting from scratch with site 2 and if so, could you point me to a step by step of the stages I need to go through or is there a way to fix this current situation.

Thanks so much for trying to help me, I’m still fairly new to jekyll, github and netlify and large media so I’m still getting my head around it conceptually.

Hi, @tofuwarrior. The key here is a new repo with no connection to the original repo and with no Git LFS or Netlify Large Media (NLM) being used in the new repo.

The “trick” there is getting the existing repo copied with all the required images/media and no Git LFS being used. I don’t have a recommended best way to do that. Forking the repo is known not to work, though.

Based on the answers here I believe that the following might work:

  • download the full repo with git lfs fetch origin --all
  • delete any references to Netlify, Git, or LFS by deleting the following files and directories:
    • .lfsconfig
    • .netlify/
    • .git/
  • make a new git repo using git init
  • push this new repo to a new upstream repo at your Git host
  • link this new repo to a new site at Netlify
  • install NLM on this new repo

In other words, somehow, create a new local repo with no connection to the other repo with all required files (not the pointers). Once this is done, push that local repo to a new repo at GitHub and then setup NLM on this new repo.

Now there are two Netlify sites on two distinct repos. There is no collision for NLM which is limited to a single instance per repo - because there are two repos now.

The downside here is that, because they are unconnected repos, there is no built-in method to use Git to copy changes from one repo into the other.

Another option here is to use two branches (one for testing and one for production) instead of two different sites for testing. This lets you test two versions of one site/repo, NLM can be used and you can still merge changes from test branches into the production branch (and the production branch doesn’t have to be “master”) using Git.

If there are other questions about this please let us know.

Hi Luke,

Thanks for your clarifications, that was really helpful.
That process appeared to work pretty well.
I did find that I had problems with pushing lfs from windows command line git, but it appeared to be to do with ssh and git and some issues specific to windows. Using git bash allowed the push to happen. Strangely, things worked fine and I had a working deployed site with lfs files until i added a new image file locally and pushed.

NOW the build fails

Citing an error relating to the new file, I’ve got nowhere understanding why.
There was some suggestion it might be an ssh problem but that doesn’t make much sense to me as this is happening at your end between netlify and github…

The error is :
12:38:18 PM: Error checking out branch: Downloading images/uploads/tcugb-logo1.png (6.4 KB)
Error downloading object: images/uploads/tcugb-logo1.png (9524a9f): Smudge error: Error downloading images/uploads/tcugb-logo1.png (9524a9f9f78220accb58e1a29af2c98680f730882420af2a9826ca59fa8d1387): batch request: missing protocol: “”
`

Have you any guidance on what this problem means and how I can fix it?

When I run GIT_CURL_VERBOSE=1 GIT_TRACE=1 git-lfs smudge < images/uploads/tcugb-logo.png locally in gitbash it doesn’t throw any errors.

Thanks again for all your help, I really appreciate it.

Paul

It looks to me like the issue is that Git LFS is enabled but not Netlify Large Media (NLM). For example, this page doesn’t show a Large Media configuration:

If you run netlify lm:info in the local repo directory, does that show NLM enabled?

For example, if NLM is configured, it should show something similar to this:

$ netlify lm:info
  ✔ Checking Git version [2.23.0]
  ✔ Checking Git LFS version [2.8.0]
  ✔ Checking Git LFS filters
  ✔ Checking Netlify's Git Credentials version [0.1.8]