Gerrit-无法在gerrit代码审查Web UI中创建用户

时间:2017-05-12 05:21:46

标签: gerrit

获取以下错误-Code Review - Error找不到您请求的页面,或者您无权查看此页面。但我已登录为管理员权限。

`server {

   listen       81 default_server;
    listen       [::]:81 default_server;
    server_name  192.168.1.34;
    root         /usr/share/nginx/html;

    # Load configuration files for the default server block.
    include /etc/nginx/default.d/*.conf;

    location  / {
    auth_basic "Basic Auth";
    auth_basic_user_file "/etc/nginx/.htpasswd";
    proxy_pass "http://192.168.1.34:8081";
    proxy_set_header  X-Forwarded-For $remote_addr;
     proxy_set_header  Host $host;

    }

}

gerrit config is 



   [gerrit]
        basePath = git
       serverId = f40260b7-33a9-45da-80e1-2336d844d0d3
       canonicalWebUrl = http://192.168.1.34:8081/gerrit
  [database]
    type = mysql
    hostname = 192.168.1.34
    database = reviewdb
    username = gerrit
 [index]
        type = LUCENE
     [auth]
          type = HTTP
    [receive]
        enableSignedPush = false
    [sendemail]
    smtpServer = 192.168.1.32
    smtpServerPort = 465
    smtpEncryption = SSL
    smtpUser = shiva.k@modefinserver.com
  [container]
     user = mfsadm
     javaHome = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-
                        0.b13.el7_3.x86_64/jre
                [sshd]
                  listenAddress = *:29418
                  [httpd]
               listenUrl = proxy-http://*:8081/
                    [cache]
        directory = cache

这些是我的配置。

1 个答案:

答案 0 :(得分:0)

如果我们使用http作为auth类型。我们需要通过命令行添加用户。

cat~ / .ssh / id_watcher.pub | ssh -p 29418 review.example.com gerrit create-account --group"'非交互式用户'" --ssh-key - 观察者