git/list[1] front-page[2] threads[3] people[4] search[5] about
 

issue with submodules using origin remote unexpectadly

From
Jacob Keller <jacob.keller@gmail.com>
Date
Oct 4, 2022, 17:43 UTC
Message-ID
<CA+P7+xrnAXceHJbBYV8Z9Ay9xbkzpiX3P0wXLwN7jfnifW2OBQ@mail.gmail.com>
Hi,

I've been running into an issue with submodules trying to fetch using "origin" even though the submodule does not have a remote by that name. (I recently switched the submodule remote name)

remote: Enumerating objects: 210, done.
remote: Counting objects: 100% (207/207), done.
remote: Compressing objects: 100% (54/54), done.
remote: Total 210 (delta 123), reused 197 (delta 119), pack-reused 3
Receiving objects: 100% (210/210), 107.20 KiB | 4.29 MiB/s, done.
Resolving deltas: 100% (123/123), completed with 48 local objects.
From <redacted>
...
Fetching submodule submodule
From <redacted>
   85e0da7533d9..80cc886f1187  <redacted>
Fetching submodule submodule2
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Errors during submodule fetch:
        submodule2

I thought at first there might be some configuration value in the parent that is selecting origin, but I can 't find one. I also thought maybe its some sort of defaulting to origin but I looked through submodule code and didn't find one.

Is it just that submodule code is not resilient against changing the default remote name away from origin?

Thanks, Jake

Next: Glen Choo
Message 1 of 5 in “issue with submodules using origin remote unexpectadly”
  1. Jacob KellerOct 4, 2022
  2. Glen ChooOct 4, 2022
  3. Jacob KellerOct 11, 2022
  4. Glen ChooOct 11, 2022
  5. Jacob KellerOct 12, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.