Android系統移植問題集(2)

同步Android代碼時遇到錯誤:fatal: empty ident  <wyp@ubuntu.(none)> not allowedandroid

是你沒有正確設置電子郵箱和用戶名git

 

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.ubuntu

//看上邊這句話,貌似說「告訴你是誰?」
//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咯。ide

相關文章
相關標籤/搜索