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
http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm
CentOS 7.x sudo yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-1.noarch.rpm
CentOS 8.x sudo yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
sudo yum install git
git --version
This should show git version 2.22.0 or higher
sudo curl -Lo install.sh https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
sh install.sh
Then follow the prompts to change your default shell, etc
Configure ohmyzsh
发表评论 取消回复