How to Incorporate https:// with "git submodule update --init --recursive"


#1

@caleberg,
I’m using Ubuntu 18.04. I successfully downloaded the following:

~/courseRoot/apm$ git clone -b Copter-4.0.3 https://github.com/ardupilot/ardupilot

However, when I type “~/courseRoot/apm/ardupilot$ git submodule update --init --recursive”, I get the following errors:

“Cloning into ‘/home/alex/courseRoot/apm/ardupilot/modules/ChibiOS’…
fatal: unable to connect to github.com:
github.com[0: 140.82.112.3]: errno=Connection timed out
fatal: clone of ‘git://github.com/ArduPilot/ChibiOS.git’ into submodule path ‘/home/alex/courseRoot/apm/ardupilot/modules/ChibiOS’ failed
Failed to clone ‘modules/ChibiOS’. Retry scheduled

Cloning into ‘/home/alex/courseRoot/apm/ardupilot/modules/gbenchmark’…
fatal: unable to connect to github.com:
github.com[0: 140.82.112.4]: errno=Connection timed out
fatal: clone of ‘git://github.com/google/benchmark.git’ into submodule path ‘/home/alex/courseRoot/apm/ardupilot/modules/gbenchmark’ failed
Failed to clone ‘modules/gbenchmark’. Retry scheduled

Cloning into ‘/home/alex/courseRoot/apm/ardupilot/modules/gtest’…”

I have an internet connection. @caleberg, I then took your advice and tried “git submodule init” followed by “git submodule update --recursive”, but it didn’t help. I saw that @dronedojopadawan provided this link explaining github updated their security:

https://github.blog/2021-09-01-improving-git-protocol-security-github/

However, I don’t know how to change the “git://github.com/ArduPilot/ChibiOS.git” to “https://github.com/ArduPilot/ChibiOS.git” like the article states to do. How do I do this for the ChibiOS, benchmark, gtest, libcanard, mavlink, uavcan, etc.? Thanks


Git submodule update --init --recursive
#2

Perhaps it is related to the 8th post on this thread?

https://community.dojofordrones.com/t/submodule-update-error/127/10


#3

@jax200, yes you are correct. Thanks! I had seen that thread as well and tried to follow the directions from the hyperlink provided by @dronedojopadawan and post my results, but my account got locked out because I posted too many hyperlinks in my reply. Therefore, the only way for me to post my results was in this new thread. Please let me know if you have any tips. I’m new to Linux. Thanks.


#4

This has not been an issue for me… Perhaps you forgot to change directories in a step? Post 14 in this thread I outline the steps for constructing the SITL using Ubuntu 20.04 and python3.

https://community.dojofordrones.com/t/launchsitl-cant-find-main-in-module-in-error/638/14

Remember to remove the dronekit ‘exceptions’ library as it doesn’t work with python3.


#5

Hello @ANM, did you get it working? I am running into the same issue.


#6

Found a solution: Fix: "git submodule update --init --recursive" ERROR: fatal: "unable to connect to github.com"

Fix
git config --global url.“https://”.insteadOf git://
git submodule update --init --recursive