问题
I just installed the Gerrit code review system release 2.12.2. I'm managing the authentication to the web interface via LDAP. Once I logged in as the Administrator, I created a project called "testProject". I'm unable to see the SSH/Anonymous HTTP/HTTP clone URLs on the project page in the GUI (see below). The documentation says that if download.scheme is left unspecified in the config, SSH/Anonymous HTTP/HTTP download methods will be the default schemes. Also, I'm unable to clone projects via a URL I created, assuming the format that gerrit would use (ssh://user@localhost:29418/testProject), although my ssh key is added (and I am able to issue commands such as gerrit ls-projects). Please let me know what I'm doing wrong. My config is attached below the image
[gerrit]
basePath = git
canonicalWebUrl = http://<url>:9001/
[database]
type = H2
database = db/ReviewDB
[index]
type = LUCENE
[auth]
type = LDAP
[ldap]
<some LDAP stuff>
[sendemail]
smtpServer = localhost
[container]
user = gerrit
javaHome = <JAVA_HOME>
[sshd]
listenAddress = *:29418
[httpd]
listenUrl = http://*:9001/
[cache]
directory = cache
回答1:
This issue has to do with not installing the download-commands plugin for Gerrit. During initialization Gerrit prompts the user to install plugins. If the user says no (or if the installation is performed in --batch mode), the plugins will not be installed.
Here is the reference ticket opened against Gerrit
https://code.google.com/p/gerrit/issues/detail?can=2&q=4029&colspec=ID%20Type%20Stars%20Milestone%20Status%20Priority%20Owner%20Summary&id=4029
To avoid reinstallation to download/install the plugins, one can: 1. Obtain the pre-built plugins The plugins for the master branch are at
https://console.cloud.google.com/storage/browser/gerritcodereview-plugins/plugins/master/
- Plugins obtained from Step 1 are incompatible with any other branch but the master. To manually build the plugins, one has to clone the required source branch and install with Buck
How to install delete-project plugin in gerrit? https://gerrit-review.googlesource.com/Documentation/dev-buck.html
- Once the *.jar files of the plugins are obtained (either by step 1 or step 2), they can be copied over to $gerrit_site/site/plugins/ either manually or by remote plugin install
https://gerrit-review.googlesource.com/Documentation/cmd-plugin-install.html
来源:https://stackoverflow.com/questions/36342703/ssh-http-anonymous-http-clone-url-not-visible-in-gerrit-2-12-2