Repo error when getting Android source code

Source: Internet
Author: User

Get Android source with repo today:
.. /bin/repo Init-u Git://android.git.kernel.org/platform/manifest.git
A problem occurred:
Question one:
Traceback (most recent):
File "./repo", line 590, in <module>
Main (sys.argv[1:])
File "./repo", line 557, in main
_init (args)
File "./repo", line 176, in _init
_checkgitversion ()
File "./repo", line 205, in _checkgitversion
proc = subprocess. Popen (cmd, stdout=subprocess. PIPE)
File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
Errread, Errwrite)
File "/usr/lib/python2.5/subprocess.py", line 1147, in _execute_child
Raise Child_exception
OSError: [Errno 2] No such file or directory

Reason: not loaded Git,faint
Solve:
sudo apt-get install git
sudo apt-get install Git-core

Question two:
Install Git and run it again:
Traceback (most recent):
File "/home/calvin/android/android2.0/source/.repo/repo/main.py", line 235, in <module>
_main (sys.argv[1:])
File "/home/calvin/android/android2.0/source/.repo/repo/main.py", line 217, in _main
Repo._run (argv)
File "/home/calvin/android/android2.0/source/.repo/repo/main.py", line 123, in _run
Cmd. Execute (Copts, Cargs)
File "/home/calvin/android/android2.0/source/.repo/repo/subcmds/init.py", line 223, in Execute
Self._configureuser ()
File "/home/calvin/android/android2.0/source/.repo/repo/subcmds/init.py", line 165, in _configureuser
Name = Self._prompt (' Your Name ', MP. UserName)
File "/home/calvin/android/android2.0/source/.repo/repo/project.py", line 306, in UserName
Self._loaduseridentity ()
File "/home/calvin/android/android2.0/source/.repo/repo/project.py", line 319, in _loaduseridentity
U = Self.bare_git.var (' git_committer_ident ')
File "/home/calvin/android/android2.0/source/.repo/repo/project.py", line 1324, in runner
P.stderr))
Error. giterror:manifests var:
***Please tell me who is you .

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 of the This repository.

Fatal:empty ident <[email protected] (none) > not allowed

Solve:
It seems that you can tell your identity.
Run:
[Email protected] ~/android/android2.0/source 18:44:28]$ git config--global user.email "[Email protected]"
[[email protected] ~/android/android2.0/source 18:44:28]$ git config--global user.name "Cavin Lee"
Run repo again:
[Email protected] ~/android/android2.0/source 18:45:00]$. /bin/repo Init-u Git://android.git.kernel.org/platform/manifest.git

Your Name [Cavin Lee]:
Your email [[email protected]]:

Your identity Is:cavin Lee <[email protected]>
Is this correct [y/n]? Y

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/calvin/android/android2.0/source(this hint appears to be successful.)

Next sync the code:
[Email protected] ~/android/android2.0/source 18:54:50]$. /bin/repo Sync

Question three:
When synchronizing code, there are constant occurrences such as "remote end hung up unexpectedlyError
Fetching projects:1% (2/158)
Initializing Project Platform/bootable/bootloader/legacy ...
Fatal:the remote end hung up unexpectedly
Error:cannot Fetch Platform/bootable/bootloader/legacy
Looks like a problem with the server.
Solve:
Reference: http://android.amberfog.com/?p=230
http://code.google.com/p/android/issues/detail?id=4488

sudo gedit. repo/repo/subcmds/sync.py
Modify the _fetch function to:

def _fetch (self, projects):
fetched = set ()
PM = Progress (' Fetching projects ', Len (projects))
For project in projects:
Pm.update ()
While True:
If Project. Sync_networkhalf ():
Fetched.add (Project.gitdir)
Break
Else
Print >>sys.stderr, ' error:cannot fetch%s '% Project.name
Pm.end ()
return fetched

Note The code indentation problem, and the corresponding code snippet indentation is exactly the same.

Repo error when getting Android source code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.