首页 > 其他 > 详细

【git】本地仓库第一次提交操作时报错-- Author identity unknown

时间:2021-05-13 19:24:38      阅读:371      评论:0      收藏:0      [点我收藏+]

 

ps:

windows系统,已安装git ,已创建一个本地仓库(git init 仓库路径)

 

error:

本地仓库第一次提交操作时报错-- Author identity unknown

 

solution:

依次执行以下指令,再重新提交即可

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

 

record:

C:\Users\asus>D:

D:\>cd D:\Git\tmp\practice

D:\Git\tmp\practice>git add 2.txt

D:\Git\tmp\practice>git add 3.txt

D:\Git\tmp\practice>git add 1.txt

D:\Git\tmp\practice>git commit -m "add all files into repository"
Author identity unknown

*** 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 accounts default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got asus@DESKTOP-T5PF78H.(none))


D:\Git\tmp\practice>git config --global user.name "cc"

D:\Git\tmp\practice>git config --global user.email "2397636949@qq.com"

D:\Git\tmp\practice>git commit -m "add all files into repository"
[master (root-commit) 91c210a] add all files into repository
 3 files changed, 3 insertions(+)
 create mode 100644 1.txt
 create mode 100644 2.txt
 create mode 100644 3.txt

 

【git】本地仓库第一次提交操作时报错-- Author identity unknown

原文:https://www.cnblogs.com/bigorangecc/p/14763987.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!