5.3 gitup 的用法

技巧

FreeBSD 14.0 已经删除了 portsnap,转而使用 git,如本文所述可以使用 gitup 替代之。

gitup,即更新 git 的意思。

安装 gitup

  • 使用 pkg 安装:

# pkg install gitup 
  • 或者使用 Ports 安装:

# cd /usr/ports/net/gitup/
# make install clean

使用 gitup

# gitup ports 	# 获取 latest 的 ports
# gitup release # 获取 release 版本的源代码

境内 Git 镜像站

# cp /usr/local/etc/gitup.conf.sample /usr/local/etc/gitup.conf

编辑,/usr/local/etc/gitup.conf,修改内容如下(有 ①②③ 共计三处需要修改):

拉取 ports:

故障排除与未竟事宜

  • 速度太慢(若不使用镜像站):设置 HTTP 代理

gitup 的代理不取决于系统代理,而是由其配置文件 /usr/local/etc/gitup.conf 单独决定。

示例(先删去前边的 # 再改):

  • 详细调试输出:

  • gitup: build_repair_command: There are too many files to repair -- please re-clone the repository: Argument list too long

清空目录重新拉取即可,可以无视 rm: /usr/ports/: Device busy 这个提示。

参考链接

最后更新于

这有帮助吗?