Skip to content

scoop 镜像

scoop-installer-mirror 项目地址

1、更换 scoop 储存库地址

原配置如下

sh
scoop config
...
# 需要更改的配置
scoop_repo  : https://github.com/ScoopInstaller/Scoop

需要将scoop_repo替换成https://gitee.com/scoop-installer-mirror/Scoop 使用以下命令

sh
scoop config scoop_repo https://gitee.com/scoop-installer-mirror/Scoop

提示

如果 scoop 配置过 proxy 则需要移除。否则可能会导致 gitee.com 访问不到,从而导致镜像库添加不成功。

2、更换镜像 buckets(桶)

警告

scoop buckets 需要保留 main 文件夹可以将 gitee-main 重命名为 main

sh
# 此处需要注意 需要将 (Main||gitee-main) 改为 scoop 默认的 main 主 bucket
scoop bucket add gitee-main https://gitee.com/scoop-installer-mirror/Main

scoop bucket add gitee-games https://gitee.com/scoop-installer-mirror/scoop-games

scoop bucket add gitee-nerd-fonts https://gitee.com/scoop-installer-mirror/scoop-nerd-fonts

scoop bucket add gitee-sysinternals https://gitee.com/scoop-installer-mirror/scoop-sysinternals

scoop bucket add gitee-extras https://gitee.com/scoop-installer-mirror/Extras

scoop bucket add gitee-java https://gitee.com/scoop-installer-mirror/Java

scoop bucket add gitee-nonportable https://gitee.com/scoop-installer-mirror/Nonportable

scoop bucket add gitee-nirsoft https://gitee.com/scoop-installer-mirror/Nirsoft

scoop bucket add gitee-php https://gitee.com/scoop-installer-mirror/PHP

scoop bucket add gitee-versions https://gitee.com/scoop-installer-mirror/Versions

提示

需要一条一条添加,批量添加可能会导致卡顿。

定时批量拉取脚本

可以每天同步最新的 git 库 原生需要使用 scoop update * 体验不丝滑

bat
@echo off
@REM 获取目录列表
@for /f "delims=" %%d in ('dir /b /a:d') do (
    echo [info::Updating %%d...]
    @REM 假如是 git 仓库的才更新
    if exist %%d\.git (
        cd %%d
        git pull
        cd ..
    ) else (
        echo [warning:: %%d is not a git repository. skipped.]
    )
)
echo [info::All Done!]
pause

常见错误

doesn't look like a valid git repository

找不到当前 git 仓库,这类错误一般就是 scoop 配置了 proxy 所致。请保证可以正常访问 gitee.com

sh
ERROR 'https://gitee.com/scoop-installer-mirror/Versions' doesn't look like a valid git repository