git 版本太老,导致的git clone 失败

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Ghost_leader/article/details/82120186
go get github.com/astaxie/beego
# cd .; git clone https://github.com/astaxie/beego /home/weijiaxiang/tmp/tmp_lib/privateline/temp/src/github.com/astaxie/beego
Initialized empty Git repository in /home/weijiaxiang/tmp/tmp_lib/privateline/temp/src/github.com/astaxie/beego/.git/
error:  while accessing https://github.com/astaxie/beego/info/refs

fatal: HTTP request failed
package github.com/astaxie/beego: exit status 128

首先 go get 的原理就是git clone 。我在装beego的时候总是出现这个问题。

解决方法一: 升级 git。

解决方法二:

git config --global url."git://github.com/astaxie/beego".insteadOf "https://github.com/astaxie/beego" 

然后再执行 go get github.com/astaxie/beego

猜你喜欢

转载自blog.csdn.net/Ghost_leader/article/details/82120186