赞
踩
git clone 时 ,权限不够。
如 fatal: unable to access : The requested URL returned error: 403
可能原因是,你之前在本电脑使用过git.
但是以前和现在又不是同一个账户。所以当你现在使用 git clone url 时 ,默认使用以前的账户信息。所以出现没有权限的状况。
解决方法:
重置本机保留的git config 信息。
命令如下:
git config --system --unset credential.helper
1
然后你再次克隆的时候,就会让你输入用户名和密码了
---------------------
用户名和邮箱地址的作用
用户名和邮箱地址是本地git客户端的一个变量,不随git库而改变。
每次commit都会用用户名和邮箱纪录。
github的contributions统计就是按邮箱来统计的。
修改密码
git config --global credential.helper store (输入这个命令后,以后只要在输入一次用户名密码)查看用户名和邮箱地址:
$ git config user.name
$ git config user.email
修改用户名和邮箱地址:
$ git config --global user.name "username"
$ git config --global user.email "email"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。