下载码云安装包
1
| wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
|
编辑 install.sh
找到以下部分
1 2 3 4 5
| ZSH=${ZSH:-~/.oh-my-zsh} REPO=${REPO:-ohmyzsh/ohmyzsh} REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-master}
|
把
1 2
| REPO=${REPO:-ohmyzsh/ohmyzsh} REMOTE=${REMOTE:-https://github.com/${REPO}.git}
|
替换为
1 2
| REPO=${REPO:-mirrors/oh-my-zsh} REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}
|
编辑后保存, 运行安装即可. (运行前先给 install.sh
权限 chmod +x install.sh
)
修改仓库地址
1 2 3
| 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/