致命:无法自动检测电子邮件地址(得到“root@pegasusv。(无)”)?

致命:无法自动检测电子邮件地址(得到“root@pegasusv。(无)”)?
pegasus@pegasusv:/linux_work/linux_stable$ sudo git commit -a
[sudo] password for pegasus: 
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  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: unable to auto-detect email address (got 'root@pegasusv.(none)')

我该如何修复该错误?

这是我的全局 .gitconfig 文件:

#[safe]
#       directory = /linux_work/linux
#       directory = /linux_work/linux-kselftest
[user]
        name = Zeshan Ahmed Nobin
        email = [email protected]

[format]
        signoff = true
[core]
        editor = vim

[sendmail]
        smtpserver = mail.xxxx.com
        smtpserverport = portnum
        smtpencryption = tls
        smtpuser = user
        smtppass = password


[safe]
        directory = /linux_work/linux_stable

尝试推送到此存储库: git remote add linux git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

本地.git目录:

 Netrw Directory Listing                                        (netrw v171)
"   /linux_work/linux_stable/.git
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../
./
branches/
hooks/
info/
logs/
objects/
refs/
FETCH_HEAD
HEAD
config
description
index
packed-refs

相关内容