#!/bin/bash -x # zephyrrtos.cn 项目导入 — 把 Zephyr 官方仓库重定向到国内镜像 # # 之后任何针对 github.com/zephyrproject-rtos/ 的 git 操作(包括 west 的拉取) # 都会自动改为访问 https://www.zephyrrtos.cn:3000/zephyrrtos_china/ 下的镜像仓库。 # # 前置:已在 zephyrrtos.cn 申请账号,并在账号里配置公钥 / 访问令牌。 # 还原:git config --global --unset url."https://www.zephyrrtos.cn:3000/zephyrrtos_china/".insteadOf git config --global url.https://www.zephyrrtos.cn:3000/zephyrrtos_china/.insteadOf https://github.com/zephyrproject-rtos/ echo "重定向已生效:" git config --global --get-regexp 'url\..*\.insteadOf'