Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout when downloading submodules recursively, even though I can clone them individually #4578

Closed
JeffreyBenjaminBrown opened this issue Sep 14, 2019 · 6 comments
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. invalid

Comments

@JeffreyBenjaminBrown
Copy link

(This issue appear to have arisen before but I don't see a solution there.)

I am installing Supercollider from source onto Linux (Debian, more specifically Kubuntu). The --recurse-submodules argument to git clone downloaded precisely one library (Ableton link), then timed out on nova-tt. I tried running git submodule init && git submodule update a few times, and it kept timing out. So I just cloned nova-tt by hand and moved it to the external_libraries folder of SuperCollider. Then when I tried git submodule init && git submodule update again, it skipped nova-tt, but timed out on other things.

I read somewhere online that this could be due to a misconfigured .gitmodules file, but I see nothing wrong with it.

The output I get looks like this:

jeff@jeff-Inspiron-5567:~/installs/SuperCollider/build$ git submodule init && git submodule update
Cloning into '/home/jeff/installs/SuperCollider/external_libraries/hidapi'...

fatal: unable to connect to github.com:
github.com[0: 140.82.113.4]: errno=Connection timed out

fatal: clone of 'git://github.com/supercollider/hidapi.git' into submodule path '/home/jeff/installs/SuperCollider/external_libraries/hidapi' failed
Failed to clone 'external_libraries/hidapi'. Retry scheduled
Cloning into '/home/jeff/installs/SuperCollider/external_libraries/nova-simd'...
fatal: unable to connect to github.com:
github.com[0: 140.82.114.4]: errno=Connection timed out

fatal: clone of 'git://github.com/timblechmann/nova-simd.git' into submodule path '/home/jeff/installs/SuperCollider/external_libraries/nova-simd' failed
Failed to clone 'external_libraries/nova-simd'. Retry scheduled
Cloning into '/home/jeff/installs/SuperCollider/external_libraries/hidapi'...
@JeffreyBenjaminBrown JeffreyBenjaminBrown added the bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. label Sep 14, 2019
@mossheim
Copy link
Contributor

Hey @JeffreyBenjaminBrown - is it possible you have restrictive network settings? The submodules that are all failing for you are using the git protocol which is frequently blocked in restrictive/corporate settings. See [1] [2] [3]

[1] https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols
[2] https://gist.github.com/grawity/4392747
[3] https://github.com/supercollider/supercollider/blob/develop/.gitmodules

@JeffreyBenjaminBrown
Copy link
Author

My OS is a vanilla KUbuntu (KDE + Ubuntu) 18.04, on my home laptop. I've never messed with network settings beyond adding Wifi networks. When you say network settings, you're not talking about my Git setup, correct? I just dug into my System Settings and I don't even see anything particularly "secure" about it -- the firewall is off, and that's the only obvious access-restriction option.

Would restrictive settings have the effect that some repos download recursively with no complaint while others don't, and the ones that don't can still be cloned without complaint?

@JeffreyBenjaminBrown
Copy link
Author

Is there any reason not to just clone each of the submodules by hand?

@JeffreyBenjaminBrown
Copy link
Author

You were right, it was the network. My computer was fine but my router seems to have something firewalled. I didn't fix the router, but I instead (inspired by this issue) I connected through my phone, and the download worked.

And to answer my previous question,

Is there any reason not to just clone each of the submodules by hand?

I tried that and it sucked pretty hard. There are submodules in more places than external_libraries/, and it takes more than just downloading them to the right place; there's some kind of linking that you'd have to forge too, which I didn't understand.

@berteodosio
Copy link

Hey @JeffreyBenjaminBrown - is it possible you have restrictive network settings? The submodules that are all failing for you are using the git protocol which is frequently blocked in restrictive/corporate settings. See [1] [2] [3]

[1] https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols [2] https://gist.github.com/grawity/4392747 [3] https://github.com/supercollider/supercollider/blob/develop/.gitmodules

For anyone struggling to clone submodules, this is what fixed it for me. In my case, the problem was that my machine wasn't cloning repos through git:// protocol, and some submodules were configured to be cloned using this protocol on .gitmodules file

The solution was to force git to always replace git:// on the urls by https://, using the following command:

git config --global url."https://".insteadOf git://

@dyfer
Copy link
Member

dyfer commented Aug 24, 2022

@berteodosio thanks for the comment. Just FYI - we had a number of submodules that were using git://, but this was fixed in develop in January 2022 and in main and 3.12 branches in April 2022 - it shouldn't be an issue anymore, I think.

evantravers added a commit to evantravers/hammerspoon-config that referenced this issue Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. invalid
Projects
None yet
Development

No branches or pull requests

5 participants