$ cd ~/gerrit $ export GERRIT_SITE=~/gerrit/gerrit_testsite $ java -jar gerrit*.war init -d $GERRIT_SITE Using secure store: com.google.gerrit.server.securestore.DefaultSecureStore [2023-06-26 16:23:02,100] [main] INFO com.google.gerrit.server.config.GerritServerConfigProvider : No /root/gerrit/gerrit_testsite/etc/gerrit.config; assuming defaults
*** Gerrit Code Review 3.7.2 ***
Create '/root/gerrit/gerrit_testsite' [Y/n]?
*** Git Repositories ***
Location of Git repositories [git]: /root/gerrit/gitrepo
*** JGit Configuration ***
Auto-configured "receive.autogc = false" to disable auto-gc after git-receive-pack.
*** Index ***
Type [lucene]:
*** User Authentication ***
Authentication method [openid/?]: HTTP Get username from custom HTTP header [y/N]? n SSO logout URL : Enable signed push support [y/N]? y Use case insensitive usernames [Y/n]?
*** Review Labels ***
Install Verified label [y/N]?
*** Email Delivery ***
SMTP server hostname [localhost]: smtp.163.com SMTP server port [(default)]: SMTP encryption [none/?]: SMTP username [root]: XXXXXXXXXX@163.com zhiyo2016@163.com's password : confirm password : error: Passwords did not match; try again zhiyo2016@163.com's password : confirm password : error: Passwords did not match; try again zhiyo2016@163.com's password : confirm password : *** Container Process *** Run as [root]: Java runtime [/usr/lib/jvm/java-11-openjdk-amd64]: Copy gerrit-3.7.2.war to /root/gerrit/gerrit_testsite/bin/gerrit.war [Y/n]? Copying gerrit-3.7.2.war to /root/gerrit/gerrit_testsite/bin/gerrit.war *** SSH Daemon *** Listen on address [*]: Listen on port [29418]: Generating SSH host key ... rsa... ed25519... ecdsa 256... ecdsa 384... ecdsa 521... done *** HTTP Daemon *** Behind reverse proxy [y/N]? Y Proxy uses SSL (https://) [y/N]? n Subdirectory on proxy server [/]: Listen on address [*]: Listen on port [8081]: Canonical URL [http://haiyong./]: *** Cache *** *** Plugins *** Installing plugins. Install plugin codemirror-editor version v3.7.2 [y/N]? y Installed codemirror-editor v3.7.2 Install plugin commit-message-length-validator version v3.7.2 [y/N]? y Installed commit-message-length-validator v3.7.2 Install plugin delete-project version v3.7.2 [y/N]? y Installed delete-project v3.7.2 Install plugin download-commands version v3.7.2 [y/N]? y Installed download-commands v3.7.2 Install plugin gitiles version v3.7.2 [y/N]? y Installed gitiles v3.7.2 Install plugin hooks version v3.7.2 [y/N]? y Installed hooks v3.7.2 Install plugin plugin-manager version v3.7.2 [y/N]? y Installed plugin-manager v3.7.2 Install plugin replication version v3.7.2 [y/N]? y Installed replication v3.7.2 Install plugin reviewnotes version v3.7.2 [y/N]? y Installed reviewnotes v3.7.2 Install plugin singleusergroup version v3.7.2 [y/N]? y Installed singleusergroup v3.7.2 Install plugin webhooks version v3.7.2 [y/N]? y Installed webhooks v3.7.2 Initializing plugins. ============================================================================ Welcome to the Gerrit community Find more information on the homepage: https://www.gerritcodereview.com Discuss Gerrit on the mailing list: https://groups.google.com/g/repo-discuss ============================================================================ Initialized /root/gerrit/gerrit_testsite Init complete, reindexing accounts,changes,groups,projects with: reindex --site-path /root/gerrit/gerrit_testsite --threads 1 --index accounts --index changes --index groups --index projectsReindexed 0 documents in accounts index in 0.0s (0.0/s) Index accounts in version 12 is ready Reindexing groups: 100% (2/2) Reindexed 2 documents in groups index in 0.2s (13.3/s) Index groups in version 9 is ready Reindexing changes: Slicing projects: 100% (2/2), done Reindexed 0 documents in changes index in 0.0s (0.0/s) Index changes in version 79 is ready Reindexing projects: 100% (2/2) Reindexed 2 documents in projects index in 0.1s (31.3/s) Index projects in version 5 is ready Executing /root/gerrit/gerrit_testsite/bin/gerrit.sh start Starting Gerrit Code Review: OK Waiting for server on haiyong.:80 ... OK Opening http://haiyong./#/admin/projects/ ...FAILED Open Gerrit with a JavaScript capable browser: http://haiyong./#/admin/projects/
$ sudo /etc/init.d/apache2 restart * Restarting Apache httpd web server apache2 (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down AH00015: Unable to open logs Action 'start' failed. The Apache error log may have more information. $ killall -9 nginx $ sudo /etc/init.d/apache2 restart * Restarting Apache httpd web server apache2 [ OK ]
$ echotest > test.txt $ git status On branch master Your branch is up to date with 'origin/master'.
Untracked files: (use "git add <file>..." to include in what will be committed) test.txt
nothing added to commit but untracked files present (use "git add" to track) $ git add test.txt warning: in the working copy of 'test.txt', LF will be replaced by CRLF the next time Git touches it $ git commit -m "gerrit提交测试" [master 6e78c4e] gerrit提交测试 1 file changed, 1 insertion(+) create mode 100644 test.txt