遇到问题
git clone -b master ...报错
:error: The requested URL returned error: 401 Unauthorized while accessing ... fatal: HTTP request failed
git version 1.7.1
解决方法
1.指定用户
git clone -b master https://git.test.cn/dafeng/project.git
换成
git clone -b master https://username@git.test.cn/dafeng/project.git
或
git clone -b master https://username:password@git.test.cn/dafeng/project.git
在push或者pull出出现的话,则需要更改远程地址
git remote set-url origin https://username@git.test.cn/dafeng/project.git
2.去除验证
git config –global http.sslverify false
3.
升级git 版本≥1.7.10
4.
添加ssh秘钥
来源:oschina
链接:https://my.oschina.net/u/1437015/blog/4682294