android2.2源码下载遇到的问题

同步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咯。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值