git更改提交用户名报错:remote: Permission to EvoIos/standford_ios_7_lecture.git denied to xxx

来源:互联网 发布:韦德数据 编辑:程序博客网 时间:2024/04/30 11:28
  • 原因有两个:

    1. 没有擦除mac自身记忆的密码串
    2. 提交对象弄错。把提交地址写错,应该是git方式,误写成htts方式了。
  • git修改提交user和email方法:

    1. 使用指令修改:
      git config –global user.name “name” –name是修改后的名字,去掉双引号
      git config –global user.email “email” –email是修改后的邮箱地址,去掉双引号
    2. 修改配置文件。
      在用户目录下:/home/username/,修改.gitconfig文件中对应的用户名和密码。
  • mac中擦除密钥串的方法:
    使用指令:git credential-osxkeychain erase

0 0