selfcustody / krux

Open-source signing device firmware for Bitcoin
https://selfcustody.github.io/krux/
Other
185 stars 37 forks source link

Failed to clone project and the submodule path 'firmware/MaixPy' #133

Closed qlrd closed 2 years ago

qlrd commented 2 years ago

Hi,

I got an error during the project cloning process, summarized in the table below.

ITEM Description
What is expected Successfully clone the project and its submodules according to the step-by-step instructions given in fetch the code
What happened Received a fatal error message from after fetch the code and its submodules
GIT version 2.37.0
Error messages (Messages separated by lines)

[1] fatal: remote error: upload-pack: not our ref 1ef6f4c0b2cb8b1872b6ffe9337f4e02d5487fa6

[2] fatal: Fetched in submodule path 'firmware/MaixPy/tools/flash/kflash_py', but it did not contain 1ef6f4c0b2cb8b1872b6ffe9337f4e02d5487fa6. Direct fetching of that commit failed.

[3] fatal: Failed to recurse into submodule path 'firmware/MaixPy'
How to reproduce [1] Execute git clone --recurse-submodules https://github.com/selfcustody/krux

or

[2] Execute git clone --recursive https://github.com/selfcustody/krux

or

[3] Execute git clone https://github.com/selfcustody/krux, cd krux and git submodule update --init --recursive
Temporary resolution [1] With some research on Stackoverflow, I found a temporary solution (with no fatal message);

[2] Execute git clone https://github.com/selfcustody/krux, then cd krux, then git submodule update --force --recursive --init --remote
Note 1 to this issue as pointed out (see answer), "Of course this is not a good solution. It is better to find and solve the underlying problem, but if anyone is in hurry, this was worked for me."
Note 2 to this issue as pointed out in a subsequent answer's comment this works "because it fetches from the latest remote instead from gits old memory"

In this sense, my intention is to find a solution with the help of the community, so that the command git clone --recurse-submodules https://github.com/selfcustody/krux works as initially expected.

ghost commented 2 years ago

Thanks for the report!

It appears that the sipeed/kflash.py repo, which is a submodule of the MaixPy repo we rely on, was deleted and replaced with a fork of the https://github.com/vowstar/kflash.py repo. The result of this is that the specific commit being pointed to no longer exists.

We can fix this by updating the MaixPy repo to point to the latest commit of kflash.py instead. Luckily, we don't actually use the kflash repo, so this shouldn't be a big problem to workaround. I'll do that now.