git submodule sync --recursive

在为父级项目拉取更新时,还会出现一种特殊的情况:
在你拉取的提交中, 可能 .gitmodules 文件中记录的子模块的 URL 发生了改变。
比如,若子模块项目改变了它的托管平台,就会发生这种情况。 此时,若父级项目引用的子模块提交不在仓库中本地配置的子模块远端上,那么执行 git pull --recurse-submodules 或 git submodule update 就会失败。 为了补救,git submodule sync 命令需要:

# 将新的 URL 复制到本地配置中
$ git submodule sync --recursive
# 从新 URL 更新子模块
$ git submodule update --init --recursive
由于我在autodl租的服务器无法访问gitlab,我已经将eigen拉到了本地,如何使lietorch访问我本地的eigen文件夹,而不访问gitlab,报错如下:(mast3r-slam) root@autodl-container-cc3746a64c-4c1769bd:~/MASt3R-SLAM# pip install --no-build-isolation -e . Looking in indexes: http://mirrors.aliyun.com/pypi/simple Obtaining file:///root/MASt3R-SLAM Checking if build backend supports build_editable ... done Preparing editable metadata (pyproject.toml) ... done Collecting lietorch@ git+https://github.com/princeton-vl/lietorch.git (from MAST3R-SLAM==0.0.1) Cloning https://github.com/princeton-vl/lietorch.git to /tmp/pip-install-f0x_dt_2/lietorch_04351692bdf34ddb927c576984b5b361 Running command git clone --filter=blob:none --quiet https://github.com/princeton-vl/lietorch.git /tmp/pip-install-f0x_dt_2/lietorch_04351692bdf34ddb927c576984b5b361 Resolved https://github.com/princeton-vl/lietorch.git to commit 0fa9ce8ffca86d985eca9e189a99690d6f3d4df6 Running command git submodule update --init --recursive -q fatal: unable to access 'https://gitlab.com/libeigen/eigen.git/': The requested URL returned error: 503 fatal: clone of 'https://gitlab.com/libeigen/eigen.git' into submodule path '/tmp/pip-install-f0x_dt_2/lietorch_04351692bdf34ddb927c576984b5b361/eigen' failed Failed to clone 'eigen'. Retry scheduled fatal: unable to access 'https://gitlab.com/libeigen/eigen.git/': The requested URL returned error: 503 fatal: clone of 'https://gitlab.com/libeigen/eigen.git' into submodule path '/tmp/pip-install-f0x_dt_2/lietorch_04351692bdf34ddb927c576984b5b361/eigen' failed Failed to clone 'eigen' a second time, aborting error: subprocess-exited-with-error × git submodule update --init --recursive -q did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × git submodule update --init --recursive -q did not run successfully. │ exit code: 1 ╰─> See above for output.
03-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值