Android系统移植问题集(2)

谁都会走 提交于 2020-03-05 15:04:42

同步Android代码时遇到错误:fatal: empty ident  <wyp@ubuntu.(none)> not allowed

是你没有正确设置电子邮箱和用户名

 

wyp@ubuntu:~/android_source$ repo init -u https://android.googlesource.com/platform/manifest

Traceback (most recent call last):
  File "/home/wyp/android_source/.repo/repo/main.py", line 385, in <module>
    _Main(sys.argv[1:])
  File "/home/wyp/android_source/.repo/repo/main.py", line 365, in _Main
    result = repo._Run(argv) or 0
  File "/home/wyp/android_source/.repo/repo/main.py", line 137, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/wyp/android_source/.repo/repo/subcmds/init.py", line 289, in Execute
    self._ConfigureUser()
  File "/home/wyp/android_source/.repo/repo/subcmds/init.py", line 211, in _ConfigureUser
    name  = self._Prompt('Your Name', mp.UserName)
  File "/home/wyp/android_source/.repo/repo/project.py", line 590, in UserName
    self._LoadUserIdentity()
  File "/home/wyp/android_source/.repo/repo/project.py", line 603, in _LoadUserIdentity
    u = self.bare_git.var('GIT_COMMITTER_IDENT')
  File "/home/wyp/android_source/.repo/repo/project.py", line 1963, in runner
    p.stderr))
error.GitError: manifests var:
*** Please tell me who you are.

//看上边这句话,貌似说“告诉你是谁?”
//Run就是解决方法咯(这是系统提示的)
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  <wyp@ubuntu.(none)> not allowed
//具体做法如下
wyp@ubuntu:~/android_source$ git config --global user.email "renjiameng@yeah.net"
wyp@ubuntu:~/android_source$ git config --global user.name "rjm"
wyp@ubuntu:~/android_source$ repo init -u https://android.googlesource.com/platform/manifest

Your identity is: rjm <renjiameng@yeah.net>
If you want to change this, please re-run 'repo init' with --config-name

Testing colorized output (for 'repo diff', 'repo status'):
  black    red      green    yellow   blue     magenta   cyan     white
  bold     dim      ul       reverse
Enable color display in this user account (y/N)? y

repo initialized in /home/wyp/android_source
//OK,用户设置完成,可以SYNC咯。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!