在Ubuntu中用repo下载和同步不同的工程,提示不能下载的问题解决方法

有时在,ununtu中用repo同步不同android工程时,提示不能同步的问题。

 

下面是网友提供的解决方法,可以解决。

同步Android代码时遇到错误:fatal: empty ident  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
     _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 "[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: empty ident  not allowed
//具体做法如下
wyp@ubuntu:~/android_source$ git config --global user.email "[email protected]"
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
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咯。

你可能感兴趣的:(在Ubuntu中用repo下载和同步不同的工程,提示不能下载的问题解决方法)