Skip to content

GitCode CLI v0.11.1

Choose a tag to compare

@github-actions github-actions released this 11 Aug 02:16
· 287 commits to main since this release
e8bb5fc

GitCode CLI v0.11.1

v0.11.1 是安装可靠性补丁版本,修复 Linux/macOS 上历史 gitcode -> gc 符号链接导致 npm bootstrap 拒绝升级的问题。

修复

  • 官方 registry 隔离的一行 bootstrap 现在能够自动迁移历史版本留在同一目录中的 gitcode -> gc 别名,无需先卸载 PyPI 包或手工删除链接。
  • 迁移只接受实际文件身份与同目录常规 gc 文件完全一致的链接;主程序目标、未知链接、越界链接及 Windows 符号链接继续拒绝覆盖。
  • 链接移动前后都会重新验证真实文件身份,不符合安全边界的链接会拒绝迁移。
  • 安装事务失败时会安全恢复旧二进制和原始链接;无法完整恢复时会明确报错并保留可恢复信息。

推荐升级方式

修复历史 npm bootstrap 安装

可信的个人本地环境可优先使用短命令:

npx -y @gitcode-cli/cli@latest install
gitcode version
gitcode doctor install

短命令会继承当前目录和用户的 npm 配置。请仅在确认这些配置(包括 .npmrc)可信时使用。

CI、审计、未知项目目录或自定义 npm registry 环境,使用安全强化命令:

npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@latest install
gitcode version
gitcode doctor install

固定版本复现同样使用安全强化参数:

npx --yes --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@0.11.1 install

不要使用 npm i @gitcode-cli/cli 安装全局 CLI;它只会添加当前项目依赖,不会更新 PATH 中已有的 gitcode。

npm 全局安装

npm install -g --ignore-scripts --registry=https://registry.npmjs.org --@gitcode-cli:registry=https://registry.npmjs.org @gitcode-cli/cli@latest
gitcode version

如果 PATH 中仍优先解析到其他渠道的旧入口,可直接运行 npm 安装目录中的 gitcode doctor install --json 查看精确冲突路径;不需要预先卸载其他包管理器。

Homebrew

brew update
brew upgrade gc

Wheel(pipx 或虚拟环境)

pipx upgrade gitcode-cli

或在已激活的虚拟环境中安装:

python -m pip install https://gitcode.com/gitcode-cli/cli/releases/download/v0.11.1/gitcode_cli-0.11.1-py3-none-any.whl

Debian / Ubuntu

wget https://gitcode.com/gitcode-cli/cli/releases/download/v0.11.1/gc_0.11.1_amd64.deb
sudo dpkg -i gc_0.11.1_amd64.deb

RHEL / CentOS / Fedora

wget https://gitcode.com/gitcode-cli/cli/releases/download/v0.11.1/gc-0.11.1-1.x86_64.rpm
sudo rpm -i gc-0.11.1-1.x86_64.rpm

验证范围

  • Windows npm 全量测试与 Windows 主机契约
  • Linux/WSL 真实符号链接迁移、事务提交、完整回滚及故障注入
  • Linux/macOS 符号链接安全边界与事务回滚
  • GitCode 与 GitHub 双端 CI 的 Linux/macOS/Windows Test、Build、Lint、Package 和 Docker 门禁
  • 独立代码/架构、测试与安全评审

完整安装与命令说明: