重新初始化一个干净的 Gerrit,但我希望 Gerrit 使用我以前的配置设置
Re-init a clean Gerrit but I want Gerrit to use my previous configuration settings
我搞砸了我的 Gerrit 安装。所以我想重新初始化 Gerrit。
我尝试这样做:
java -jar gerrit-2.15.1.war init -d /my_gerrit_destination
Gerrit 问我是否想使用我以前的设置。完美!
但是..我弄乱了 /index 文件夹中的一些文件,所以我的初始化失败了。
是否可以清理全部或部分 directories/files 并且 Gerrit 仍会询问我是否要使用与以前相同的配置?
我问是因为在配置中持有一些已用密码的人正在度假。
编辑:
1.I 删除了索引目录。
2.I 运行 再次执行上面的初始化命令。
3.Gerrit 启动失败
4.Checked 在 error.log 中并按照有关重新索引某些目录的说明进行操作,但在 error.log:
中出现错误
[2018-07-04 14:39:39,989] [main] WARN com.google.gerrit.sshd.SshDaemon : Cannot format SSHD host key [EdDSA]: invalid key type
[2018-07-04 14:39:40,006] [main] WARN com.google.gerrit.server.config.GitwebCgiConfig : gitweb not installed (no /usr/lib/cgi-bin/gitweb.cgi found)
[2018-07-04 14:39:41,069] [main] INFO org.eclipse.jetty.util.log : Logging initialized @11300ms
[2018-07-04 14:39:41,161] [main] INFO com.google.gerrit.server.git.LocalDiskRepositoryManager : Defaulting core.streamFileThreshold to 1339m
[2018-07-04 14:39:41,635] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /opt/gerrit/plugins
[2018-07-04 14:39:41,745] [main] ERROR com.google.gerrit.pgm.Daemon : Unable to start daemon
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) No index versions for index 'groups' ready; run java -jar /opt/gerrit/bin/gerrit.war reindex --index groups
1 error
at com.google.gerrit.server.index.VersionManager.initIndex(VersionManager.java:173)
at com.google.gerrit.server.index.VersionManager.start(VersionManager.java:94)
at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:92)
at com.google.gerrit.pgm.Daemon.start(Daemon.java:349)
at com.google.gerrit.pgm.Daemon.run(Daemon.java:256)
at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:223)
at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:119)
at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:63)
at Main.main(Main.java:24)
5.I 试图 运行 java -jar /opt/gerrit/bin/gerrit.war reindex --index groups
但我得到
`fatal: not a Gerrit site: '.'
fatal: Perhaps you need to run init first?`
6.New init 无法启动 Gerrit。
1) 删除索引目录
rm -rf GERRIT-SITE/index
2) 运行 重建索引命令
java -jar gerrit-VERSION.war reindex -d GERRIT-SITE
我搞砸了我的 Gerrit 安装。所以我想重新初始化 Gerrit。 我尝试这样做:
java -jar gerrit-2.15.1.war init -d /my_gerrit_destination
Gerrit 问我是否想使用我以前的设置。完美!
但是..我弄乱了 /index 文件夹中的一些文件,所以我的初始化失败了。
是否可以清理全部或部分 directories/files 并且 Gerrit 仍会询问我是否要使用与以前相同的配置? 我问是因为在配置中持有一些已用密码的人正在度假。
编辑:
1.I 删除了索引目录。
2.I 运行 再次执行上面的初始化命令。
3.Gerrit 启动失败
4.Checked 在 error.log 中并按照有关重新索引某些目录的说明进行操作,但在 error.log:
中出现错误[2018-07-04 14:39:39,989] [main] WARN com.google.gerrit.sshd.SshDaemon : Cannot format SSHD host key [EdDSA]: invalid key type
[2018-07-04 14:39:40,006] [main] WARN com.google.gerrit.server.config.GitwebCgiConfig : gitweb not installed (no /usr/lib/cgi-bin/gitweb.cgi found)
[2018-07-04 14:39:41,069] [main] INFO org.eclipse.jetty.util.log : Logging initialized @11300ms
[2018-07-04 14:39:41,161] [main] INFO com.google.gerrit.server.git.LocalDiskRepositoryManager : Defaulting core.streamFileThreshold to 1339m
[2018-07-04 14:39:41,635] [main] INFO com.google.gerrit.server.plugins.PluginLoader : Loading plugins from /opt/gerrit/plugins
[2018-07-04 14:39:41,745] [main] ERROR com.google.gerrit.pgm.Daemon : Unable to start daemon
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) No index versions for index 'groups' ready; run java -jar /opt/gerrit/bin/gerrit.war reindex --index groups
1 error
at com.google.gerrit.server.index.VersionManager.initIndex(VersionManager.java:173)
at com.google.gerrit.server.index.VersionManager.start(VersionManager.java:94)
at com.google.gerrit.lifecycle.LifecycleManager.start(LifecycleManager.java:92)
at com.google.gerrit.pgm.Daemon.start(Daemon.java:349)
at com.google.gerrit.pgm.Daemon.run(Daemon.java:256)
at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:223)
at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:119)
at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:63)
at Main.main(Main.java:24)
5.I 试图 运行 java -jar /opt/gerrit/bin/gerrit.war reindex --index groups
但我得到
`fatal: not a Gerrit site: '.'
fatal: Perhaps you need to run init first?`
6.New init 无法启动 Gerrit。
1) 删除索引目录
rm -rf GERRIT-SITE/index
2) 运行 重建索引命令
java -jar gerrit-VERSION.war reindex -d GERRIT-SITE