问题
I'm trying to set up Gerrit and repo for Android development in a closed shop. I had very little trouble installing a Gerrit server, but I'm getting this error at a client workstation:
$ repo start Falk .
$ vi AndroidManifest.xml
$ git commit -m 'minor change' -a
[Falk b3398ba] minor change
1 file changed, 2 insertions(+)
$ repo upload .
Upload project packages/apps/Calculator/ to remote branch refs/tags/android-5.1.0_r1:
branch Falk ( 1 commit, Thu Mar 17 15:20:09 2016 -0700):
72aa6b93 just a minor change
to None (y/N)? y
Traceback (most recent call last):
...
error.GitError: remote aosp has no review url
I'm guessing that I made a configuration error installing Gerrit, and/or brought my initial repo over the wrong way.
This is roughly how I did my original bringover:
$ mkdir git
$ cd git
$ repo init -u https://android.googlesource.com/mirror/manifest --mirror
$ repo sync
Is there anything I should have done differently? When I configured Gerrit, I took all the defaults.
Should I modify the manifest, perhaps?
Is there a "how-to" recipe for setting up Gerrit for Android development?
回答1:
I just stumbled up on this error myself today. I will share my solution for future references.
The remote AOSP repository defined in your default manifest does not have the Gerrit server review url. "Repo upload" submits your patch to the web based code review system(Gerrit) for reviewers to review your code.
Solution: Add the last line into your manifest file.
Inside .repo/manifest.xml:
<remote name="aosp"
fetch=".."
review="https://android-review.googlesource.com/"/>
来源:https://stackoverflow.com/questions/36073237/error-giterror-remote-has-no-review-url-encountered-with-gerrit-repo