gerrit雜記

這裏寫圖片描述
出現了The HTTP server did not provide the username in the Authorization header when it forwarded the request to Gerrit Code Review. 這個錯誤的時候。

   location / {
          auth_basic              "Gerrit Code Review";
          #這裏漏了
          auth_basic_user_file    /passwords;
          proxy_pass              http://127.0.0.1:8888;
          proxy_set_header        X-Forwarded-For $remote_addr;
          proxy_set_header        Host $host;
        }

增加一句就好
auth_basic_user_file /passwords;

gerrit創建用戶
htpasswd -c /passwords admin 創建文件,並新增一個用戶
htpasswd -m /passwords admin 新增一個用戶

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章