问题
报错: error: The requested URL returned error: 401 Unauthorized while accessing
git版本:1.7.1
**解决方法一:**指定用户
git clone https://github.com/org/project.git
换成
git clone https://username@github.com/org/project.git
或者
git clone https://username:password@github.com/org/project.git
在push或者pull出出现的话,则需要更改远程地址
git remote set-url origin https://username@github.com/org/project.git
解决方法二: 去除验证
git config –global http.sslverify false
解决方法三:(推荐)
升级git 版本≥1.7.10
解决方法四:
添加ssh秘钥
当使用Git遇到401错误时,可能是认证问题。解决方法包括:1) 指定用户名和密码克隆仓库;2) 关闭SSL验证;3) 升级Git到1.7.10以上版本;4) 添加SSH密钥进行身份验证。选择合适的方法可以避免未经授权的访问错误。
1560

被折叠的 条评论
为什么被折叠?



