Failed to connect to repository : Command "git ls-remote -h git@192.168.91.11:test/dzp.git HEAD" returned status code 128:
stdout:
stderr: Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
1.卸载自带的git,因为版本太低
本地服务器版本:
[root@vm_001034_op-test git-2.0.5]# cat /etc/redhat-release
CentOS release 6.5 (Final)
[root@vm_001034_op-test git-2.0.5]#
笔者从网上找了很多资料,最终参考几份资料才安装成功的。
原因很简单,就是没有安装git的依赖包。
以下yum是执行的一些解决依赖的yum命令,有些报错有些成功,应该是最后几条生效解决了 :
yum groupinstall “Development Tools”
yum install “Development Tools”
yum install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel
yum install openssl-devel
yum install -y xmlto
yum install -y asciidoc
yum install zlib-devel perl-ExtUtils-MakeMaker
yum install zlib-devel
yum install perl-ExtUtils-MakeMaker
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
yum install gcc perl-ExtUtils-MakeMaker
yum remove git
下载安装git
cd /usr/src/
wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
tar xzf git-2.0.5.tar.gz
cd git-2.0.5
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
git --version
2.将ssh的私钥添加到验证信息中(不是xxx.pub)
来源:oschina
链接:https://my.oschina.net/u/3966437/blog/4294112