Cloning Oh My Zsh...
error: unknown switch `c'
usage: git clone [options] [--] <repo> [<dir>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --progress            force progress reporting
    -n, --no-checkout     don't create a checkout
    --bare                create a bare repository
    --mirror              create a mirror repository (implies bare)
    -l, --local           to clone from a local repository
    --no-hardlinks        don't use local hardlinks, always copy
    -s, --shared          setup as shared repository
    --recursive           initialize submodules in the clone
    --template <path>     path the template repository
    --reference <repo>    reference repository
    -o, --origin <branch>
                          use <branch> instead of 'origin' to track upstream
    -b, --branch <branch>
                          checkout <branch> instead of the remote's HEAD
    -u, --upload-pack <path>
                          path to git-upload-pack on the remote
    --depth <depth>       create a shallow clone of that depth

Error: git clone of oh-my-zsh repo failed

检查git 版本

git --version
git version 1.7.1

原因是git 版本过低

I figured out a work around! It is an issue with the version of git that you have installed!

Here is a guide on how to install ohmyzsh from a fresh centos install!

sudo yum install zsh
sudo yum install wget git
sudo yum remove git*

This next step depends on your CentOS version - pay atention to the URL
CentOS 6.x sudo yum install
CentOS 7.x sudo yum install
CentOS 8.x sudo yum install
sudo yum install git
git --version
This should show git version 2.22.0 or higher
sudo curl -Lo
Then follow the prompts to change your default shell, etc
Configure ohmyzsh

请联系我 商务合作、广告投放、题目勘误、侵权投诉


Comment list 共有 0 条评论