Submodule update error


#1

Hey! Ive been having a problem getting the ardupilot submodule to update. when I type “git submodule update --init --recursive” I receive an error that states:

“fatal: read error: connection reset by peer
fatal: clone of git://github.com/Ardupilot/PX4Firmware.git into submodule path ‘modules/Px4Firmware’ failed”

I was wondering if anyone has run into the same problem or if anyone can shed some light onto the situation.
Thank you!
-charles


#2

Hi there Charles!

Hmmm that does sound weird. Just want to make sure you are 100% connected to the internet?

If so, maybe try this first:

git submodule init
then try
git submodule update --recursive

Also, out of curiosity, was your ardupilot repo installed with the “Copter-3.5.5” branch?


#3

Awesome thank you! I’ll give that a try!
also yes I am connected to the internet and when I installed ardupilot i did use the “Copter-3.5.5” branch.
Thank you for helping me out, I’m still learning Linux .

cheers
-charles


#4

But why are you downloading PX4 rather than ardupilot?

Should state

git clone -b Copter-3.5.5 https://github.com/ardupilot/ardupilot


#5

No problem, let me know how it works or if we need to get back to the drawing board!

@jax200

I believe there are some submodules of the PX4 repo that are used in the ArduPilot main repo, and are initialized with the git submodule update --init --recursive command.


#6

Now I see it. I didn’t realize the course was relevant to PX4 installs.


#7

Hey yall, thanks for helping. The problem was my wifi was blocking ssh. I switched to a VPN and was able to get it all to work.

-charles


#8

been trying these commands… it or any variation doesn’t work


#9

have tried these… mmmmm stuck!!!


#10

Hi Dennis
Your are referring to a first time install?
I can try to help if you list exactly the code statements you are using.


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

Hi, I just ran into that issue recently, it seems that starting 2022, github is updating their security. So they won’t allow unsecure or unauthenticated logins or downloads. See notes
https://github.blog/2021-09-01-improving-git-protocol-security-github/
I was able to perform the git submodule update --init --recursive (after) following their instructions which called to log into their secure git repositories.
The course calls out for git:// which is unsecure, maybe it can be updated in the future to point to the secure directory/repository.


#12

@dronedojopadawan, could you elaborate in more detail what section to go to in the link you provided us to fix this issue? I’m new to Linux and I think I need change the URLs from the unsecured git:// to the secure https:// for the ChibiOS, benchmark, gtest, libcanard, mavlink, uavcan, etc. The 1st image shows my issue


#13

Hello @charlestobin, did you switch to a VPN through your host computer or through Ubuntu? I am on a Mac and I want to try switching to a VPN because I am having the same “submodule update” issue.


#14

The issue is a GitHub security update. you can no longer use the GIT:// protocol unauthenticated.

Just go into the ardupilot/.git/config file and change the submodule URLs from GIT:// to HTTPS:// and it will work.


#15

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


#16

This solution worked for me. Thank you!!


#17

I also used that in combination with installing and using openvpn (free)

https://www.webhi.com/how-to/how-to-install-openvpn-server-on-ubuntu/