zoukankan      html  css  js  c++  java
  • 新电脑连接远程git库后,提交代码时报错让设置用户名和邮箱

    具体报错如下:

    *** Please tell me who you are.
    
    Run
    
      git config --global user.email "you@example.com"
      git config --global user.name "Your Name"
    
    to set your account's default identity.
    Omit --global to set the identity only in this repository.
    
    fatal: empty ident name (for <peng_@LAPTOP-50UB5IJ5>) not allowed

    报错翻译如下:

    ***请告诉我你是谁。
    
    运行
    
    git config --global user.email”邮箱”
    git config --global user.name”你的名字”
    
    设置帐户的默认标识。
    省略—全局仅在这个存储库中设置标识。
    
    致命错误:无法自动检测电子邮件地址(有peng_ @ laptop-50ub5ij5。(无)”)

    原因:

    git库不认识现在这台电脑是谁,需要把自己的公钥名或者邮箱告诉git库。

    解决方法:

    git config --global user.email "邮箱"
    git config --global user.name "公钥名"
    # user.name后面添加上公钥的用户名
  • 相关阅读:
    前端线上项目汇总
    gulp构建工具学习汇总
    ES6知识点汇总
    页游技术点汇总中
    前后端方案汇总
    vim常用命令
    互联网哲学
    js调试技巧汇总中
    windows下Docker安装MySQL
    RabbitMQ几个常用面试题
  • 原文地址:https://www.cnblogs.com/APeng2019/p/10719435.html
Copyright © 2011-2022 走看看