# LFS missing for submodules

**URL:** <https://renku.discourse.group/t/lfs-missing-for-submodules/675>\
**Category:** General\
**Created:** [2 August 2022 14:44 UTC](https://renku.discourse.group/t/lfs-missing-for-submodules/675 "2022-08-02T14:44:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![firat](https://avatars.discourse-cdn.com/v4/letter/f/ecae2f/32.png) [@firat](https://renku.discourse.group/u/firat)\
**Post date:** [2 August 2022 14:44 UTC](https://renku.discourse.group/t/lfs-missing-for-submodules/675/1 "2022-08-02T14:44:23Z")

</div>

Hello,

I have a public repo in renku [oadat-evaluate](https://renkulab.io/gitlab/firat.ozdemir/oadat-evaluate) with LFS files in it.  
For a manuscript, we have another public repo in github [OADAT](https://github.com/berkanlafci/oadat).  
I want to add oadat-evaluate gitlab repo as a submodule to OADAT github repo to have everything self-contained in a single repo with demos and such.  
I do not have issues creating the git submodule, however, it does complain about LFS files in renku. So I added the submodule after setting skip-smudge as

```auto
git lfs install --skip-smudge
git submodule add git@github.com:firatozdemir/oadat-evaluate.git oadat_evaluate

```

So far so good.  
However, if I try `git lfs pull` from within the submodule; i.e.:

```auto
cd oadat_evaluate
git lfs pull

```

I basically get the error that none of the LFS objects exist on the server.  
To give an example:

> …  
> [319f5c3b536635b8d8aee61078b904b85d229557a9b15b2fd40817423cb3e296] Object does not exist on the server: [404] Object does not exist on the server  
> [7f239dcd61ab734884f27fc93e8842a667ac5ea25f8661acf48d7f66c6df9a27] Object does not exist on the server: [404] Object does not exist on the server  
> [6751e9f73188b440620d1a40b57c40703886e337e9dffffef92bcd0711adfbb8] Object does not exist on the server: [404] Object does not exist on the server  
> [3a927f841764a4285a5e1ae7dba3bc34747854e0f934bd09cb7490b9b527acc5] Object does not exist on the server: [404] Object does not exist on the server

If I understand correctly, the parent repo OADAT simply does not have the right configuration for the `git config lfs.url`, but I was not able to figure this out.  
Can someone comment on what might be the problem?

---

<div class="post-metadata">

**Author:** ![mohammad-sdsc](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/mohammad-sdsc/32/79_2.png) [@mohammad-sdsc](https://renku.discourse.group/u/mohammad-sdsc)\
**Post date:** [3 August 2022 06:50 UTC](https://renku.discourse.group/t/lfs-missing-for-submodules/675/2 "2022-08-03T06:50:12Z")

</div>

Hey Firat,

It seems that the LFS object weren’t pushed in the first place. If I only clone oadat-evaluate and do an lfs pull it won’t work and gives the same error:

```auto
$ git clone git@github.com:firatozdemir/oadat-evaluate.git
$ cd oadat-evaluate
$ git lfs install --local --skip-smudge
$ git lfs pull
.
.
.
[7f239dcd61ab734884f27fc93e8842a667ac5ea25f8661acf48d7f66c6df9a27] Object does not exist on the server: [404] Object does not exist on the server
[6751e9f73188b440620d1a40b57c40703886e337e9dffffef92bcd0711adfbb8] Object does not exist on the server: [404] Object does not exist on the server
[3a927f841764a4285a5e1ae7dba3bc34747854e0f934bd09cb7490b9b527acc5] Object does not exist on the server: [404] Object does not exist on the server
Failed to fetch some objects from 'https://github.com/firatozdemir/oadat-evaluate.git/info/lfs'

```

Does it work for you (I might not have the permission to access them)? If not, then probably LFS objects weren’t pushed: [github - Error when getting git LFS files: Object does not exist on the server: [404] Object does not exist on the server - Stack Overflow](https://stackoverflow.com/a/62855597)

---

<div class="post-metadata">

**Author:** ![firat](https://avatars.discourse-cdn.com/v4/letter/f/ecae2f/32.png) [@firat](https://renku.discourse.group/u/firat)\
**Post date:** [3 August 2022 07:07 UTC](https://renku.discourse.group/t/lfs-missing-for-submodules/675/3 "2022-08-03T07:07:27Z")

</div>

Hi Mohammad,

Thanks for looking at it. I’m confused. The LFS are pushed, I can see it on [Firat Özdemir / oadat-evaluate · GitLab](https://renkulab.io/gitlab/firat.ozdemir/oadat-evaluate).  
I also tried the link you shared (`git lfs push --all`) from the original repo I pushed things from, which does not push anything new since all are pushed already. Maybe something else is broken?

---

<div class="post-metadata">

**Author:** ![firat](https://avatars.discourse-cdn.com/v4/letter/f/ecae2f/32.png) [@firat](https://renku.discourse.group/u/firat)\
**Post date:** [3 August 2022 08:40 UTC](https://renku.discourse.group/t/lfs-missing-for-submodules/675/4 "2022-08-03T08:40:35Z")

</div>

Hi @mohammad-sdsc,

I just tried creating a session on renkulab with automatically download LFS on start option and all LFS files are available in my session.  
So this issue with LFS only happens if I locally try to clone the repo and lfs pull. I still believe it’s something to do with wrong lfs server configuration, but it’s a territory I don’t know much. Can you advise?  
Thanks!

---

<div class="post-metadata">

**Author:** ![mohammad-sdsc](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/mohammad-sdsc/32/79_2.png) [@mohammad-sdsc](https://renku.discourse.group/u/mohammad-sdsc)\
**Post date:** [3 August 2022 08:55 UTC](https://renku.discourse.group/t/lfs-missing-for-submodules/675/5 "2022-08-03T08:55:47Z")

</div>

I found the problem with the help of `GIT_CURL_VERBOSE=1 GIT_TRANSFER_TRACE=1 GIT_TRACE=1 git lfs pull` although it was kinda obvious from the beginning: You are adding the submodule from Github and not gitlab and the objects don’t exist on GH. You should do:

```auto
git submodule add git@renkulab.io:firat.ozdemir/oadat-evaluate.git oadat_evaluate

```

It worked for me after this.

---

<div class="post-metadata">

**Author:** ![mohammad-sdsc](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/mohammad-sdsc/32/79_2.png) [@mohammad-sdsc](https://renku.discourse.group/u/mohammad-sdsc)\
**Post date:** [3 August 2022 08:57 UTC](https://renku.discourse.group/t/lfs-missing-for-submodules/675/6 "2022-08-03T08:57:05Z")

</div>

It’s actually in the error message that I’ve got 😅

---

<div class="post-metadata">

**Author:** ![rrrrrok](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/rrrrrok/32/117_2.png) [@rrrrrok](https://renku.discourse.group/u/rrrrrok)\
**Post date:** [3 August 2022 09:26 UTC](https://renku.discourse.group/t/lfs-missing-for-submodules/675/7 "2022-08-03T09:26:00Z")

</div>

Btw, in general you can override the LFS server location in case it’s needed when you mix and match repo sources: [git-lfs/server-discovery.md at main · git-lfs/git-lfs · GitHub](https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#custom-configuration)
