美文网首页MAC 环境 前端开发环境
oh-my-zsh国内镜像安装和更新方法

oh-my-zsh国内镜像安装和更新方法

作者: 龍門渕透華 | 来源:发表于2020-06-02 11:11 被阅读0次

    安装依赖

    1. git
    2. zsh

    下载码云安装包

    wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
    

    编辑install.sh

    找到以下部分

    # Default settings
    ZSH=${ZSH:-~/.oh-my-zsh}
    REPO=${REPO:-ohmyzsh/ohmyzsh}
    REMOTE=${REMOTE:-https://github.com/${REPO}.git}
    BRANCH=${BRANCH:-master}
    

    REPO=${REPO:-ohmyzsh/ohmyzsh}
    REMOTE=${REMOTE:-https://github.com/${REPO}.git}
    

    替换为

    REPO=${REPO:-mirrors/oh-my-zsh}
    REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}
    

    编辑后保存, 运行安装即可. (运行前先给install.sh权限)

    修改仓库地址

    cd ~/.oh-my-zsh
    git remote set-url origin https://gitee.com/mirrors/oh-my-zsh.git
    git pull
    

    原文地址: https://touka.dev/tech/oh-my-zsh-china-mirror/

    相关文章

      网友评论

        本文标题:oh-my-zsh国内镜像安装和更新方法

        本文链接:https://www.haomeiwen.com/subject/kpzyzhtx.html