当前位置:   article > 正文

git 查看/修改用户名、密码_git clone user.name 查看user.name

git clone user.name 查看user.name

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
然后你再次克隆的时候,就会让你输入用户名和密码了

 


--------------------- 

 

  1. 用户名和邮箱地址的作用

    用户名和邮箱地址是本地git客户端的一个变量,不随git库而改变。

    每次commit都会用用户名和邮箱纪录。

    github的contributions统计就是按邮箱来统计的。

  2. 修改密码

    git config --global credential.helper store (输入这个命令后,以后只要在输入一次用户名密码)
  3. 查看用户名和邮箱地址:

     
    1. $ git config user.name

    2. $ git config user.email

  4. 修改用户名和邮箱地址:

     
    1. $ git config --global user.name "username"

    2.  
    3. $ git config --global user.email "email"

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/447173
推荐阅读
相关标签
  

闽ICP备14008679号