Git Pull Failed: repository '.git/' not found

当Git服务器迁移并更改地址后,本地仓库尝试拉取时会报错'repository not found'。解决方法是使用命令`git remote set-url origin`更新本地的远程仓库URL为新的地址。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题描述:git服务器迁移,git地址改变,但是本地没有变更新的git地址,导致pull或上传是失败。

Git Pull Failed: repository 'http://gitlab.***.com/***/***.git/' not found

问题解决如下方案:

git remote set-url origin 改变后的git地址(新的git地址),

例如:git remote set-url origin http://gitlab.***.com/***/***.git

me@me-Yilong15Pro-Series-GM5HG0A:~/下载/px4-autopilot-1.15.4$ make px4_fmu-v5_default -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.8.10", minimum required is "3") -- PX4 config file: /home/me/下载/px4-autopilot-1.15.4/boards/px4/fmu-v5/default.px4board -- PLATFORM nuttx -- TOOLCHAIN arm-none-eabi -- ARCHITECTURE cortex-m7 -- ROMFSROOT px4fmu_common -- IO px4_io-v2_default -- SERIAL_GPS1 /dev/ttyS0 -- SERIAL_TEL1 /dev/ttyS1 -- SERIAL_TEL2 /dev/ttyS2 -- SERIAL_TEL4 /dev/ttyS3 -- UAVCAN_INTERFACES 2 -- UAVCAN_TIMER_OVERRIDE 6 -- PX4 config: px4_fmu-v5_default -- PX4 platform: nuttx fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx mv: 无法获取'.version.tmp' 的文件状态(stat): 没有那个文件或目录 fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx mv: 无法获取'.version.tmp' 的文件状态(stat): 没有那个文件或目录 fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx mv: 无法获取'.version.tmp' 的文件状态(stat): 没有那个文件或目录 -- The CXX compiler identification is GNU 9.2.1 -- The C compiler identification is GNU 9.2.1 -- The ASM compiler identification is GNU -- Found assembler: /usr/bin/arm-none-eabi-gcc -- Check for working CXX compiler: /usr/bin/arm-none-eabi-g++ -- Check for working CXX compiler: /usr/bin/arm-none-eabi-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working C compiler: /usr/bin/arm-none-eabi-gcc -- Check for working C compiler: /usr/bin/arm-none-eabi-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Enabling double FP precision hardware instructions -- cmake build type: MinSizeRel -- ccache enabled (export CCACHE_DISABLE=1 to disable) -- drivers/px4io: ROMFS including px4_io-v2_default -- Found PythonInterp: /usr/bin/python3 (found version "3.8.10") -- Using C++11 -- Release build type: MinSizeRel /usr/bin/python3: Error while finding module specification for 'symforce.symbolic' (ModuleNotFoundError: No module named 'symforce') -- ROMFS: ROMFS/px4fmu_common -- ROMFS: Adding platforms/nuttx/init/stm32f7/rc.board_arch_defaults -> /etc/init.d/rc.board_arch_defaults -- ROMFS: Adding boards/px4/fmu-v5/init/rc.board_defaults -> /etc/init.d/rc.board_defaults -- ROMFS: Adding boards/px4/fmu-v5/init/rc.board_sensors -> /etc/init.d/rc.board_sensors -- ROMFS: Adding boards/px4/fmu-v5/extras/px4_fmu-v5_bootloader.bin -> /etc/extras/px4_fmu-v5_bootloader.bin -- ROMFS: Adding boards/px4/fmu-v5/extras/px4_io-v2_default.bin -> /etc/extras/px4_io-v2_default.bin -- Configuring done -- Generating done -- Build files have been written to: /home/me/下载/px4-autopilot-1.15.4/build/px4_fmu-v5_default [0/1324] git submodule src/modules/uxrce_dds_client/Micro-XRCE-DDS-Client [8/1324] git submodule platforms/nuttx/NuttX/nuttx [10/1324] Generating git version header FAILED: src/lib/version/build_git_version.h cd /home/me/下载/px4-autopilot-1.15.4 && /usr/bin/python3 /home/me/下载/px4-autopilot-1.15.4/src/lib/version/px_update_git_header.py /home/me/下载/px4-autopilot-1.15.4/build/px4_fmu-v5_default/src/lib/version/build_git_version.h --validate Error: the git tag 'ba685c85fc' does not match the expected format. The expected format is 'v<PX4 version>[-<custom version>]' <PX4 version>: v<major>.<minor>.<patch>[-rc<rc>|-beta<beta>|-alpha<alpha>|-dev] <custom version>: <major>.<minor>.<patch>[-rc<rc>|-beta<beta>|-alpha<alpha>|-dev] Examples: v1.9.0-rc3 (preferred) v1.9.0-beta1 v1.9.0-1.0.0 v1.9.0-1.0.0-alpha2 See also https://docs.px4.io/main/en/dev_setup/building_px4.html#building-for-nuttx [19/1324] Generating ../../../platforms/nuttx/NuttX/nuttx/.config fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx mv: 无法获取'.version.tmp' 的文件状态(stat): 没有那个文件或目录 fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx mv: 无法获取'.version.tmp' 的文件状态(stat): 没有那个文件或目录 fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx fatal: 不是 git 仓库:/home/me/下载/px4-autopilot-1.15.4/platforms/nuttx/NuttX/nuttx/../../../../.git/modules/platforms/nuttx/NuttX/nuttx mv: 无法获取'.version.tmp' 的文件状态(stat): 没有那个文件或目录 [20/1324] Generating uORB topic ucdr headers ninja: build stopped: subcommand failed. make: *** [Makefile:227:px4_fmu-v5_default] 错误 1 me@me-Yilong15Pro-Series-GM5HG0A:~/下载/px4-autopilot-1.15.4$
最新发布
08-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

沉淀的沙

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值