How to Use repo when android.git.kernel.org cannot be accessed

Source: Internet
Author: User

Kernel.org maintenance, android.git.kernel.org simply does not resolve the domain name.
However, I just used the repo to download the code from other git servers and tried to start it. The tragedy found that the repo tried to connect to android.git.kernel.org, and then failed, and then dumb.
Come on, repo. What are you doing?
The original repo needs to download a full set of repo tool sets to the. repo/repo directory, and then use this tool set to download the source code library on the git server.
Fortunately, I packed all the files downloaded from android2.3.4 and found the directory. repo/repo. After a while, I modified the repo python script and restored the previously backed up. repo/repo to the directory I want to download.
The 51cto file in the repo toolset cannot be uploaded. If you need it, send me a message via Weibo: weibo.com/carltao.
The following is ~ /Bin/repo modification location
Carl @ carl-ubuntu10-T400 :~ /Bin $ diff repo. bak repo
5, 6d4
<REPO_URL = 'git: // android.git.kernel.org/tools/repo.git'
<REPO_REV = 'stable'
151,166 d148
<Url = opt. repo_url
<If not url:
<Url = REPO_URL
<Extra_args.append ('-- repo-url = % s' % url)
<
<Branch = opt. repo_branch
<If not branch:
<Branch = REPO_REV
<Extra_args.append ('-- repo-branch = % s' % branch)
<
<If branch. startswith ('refs/heads /'):
<Branch = branch [len ('refs/heads/'):]
<If branch. startswith ('refs /'):
<Print> sys. stderr, "fatal: invalid branch name '% S'" % branch
<Raise CloneFailure ()
<
180,204 d161
<Try:
<If _ NeedSetupGnuPG ():
<Can_verify = _ SetupGnuPG (opt. quiet)
<Else:
<Can_verify = True
<
<If not opt. quiet:
<Print> sys. stderr, 'Getting repo ...'
<Print> sys. stderr, 'from % s' % url
<
<Dst = OS. path. abspath (OS. path. join (repodir, S_repo ))
<_ Clone (url, dst, opt. quiet)
<
<If can_verify and not opt. no_repo_verify:
<Rev = _ Verify (dst, branch, opt. quiet)
<Else:
<Rev = 'refs/remotes/origin/% s ^ 0' % branch
<
<_ Checkout (dst, branch, rev, opt. quiet)
<Rule t CloneFailure:
<If opt. quiet:
<Print> sys. stderr ,\
<'Fatal: repo init failed; run without -- quiet to see why'
<Raise
<
 
Author "Happy technician"

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.