My gerrit server switched the auth from http to ldap, now I can login and logout
with ldap no problem, and 'git clone' with ssh also doesn't have problem.
But when I clone the repos with http protocol, it always says
Just before when using http, git will prompt the password and wait for input, now
there is no any prompt.
Here is my gerrit settings:
[auth]
type = ldap
emailFormat = {
0}@mycompany.com gitBasicAuthPolicy = ldap
trustContainerAuth = true
ldap]
server = ldap://my_ldap_ip
username = cn=admin,dc=software,dc=com
accountBase = ou=gerrit,dc=software,dc=com
groupBase = dc=software,dc=com
...
and the nginx settings:
...
# SSL stapling (optional)
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
# Log files for Nginx's logging utilities
access_log /var/log/nginx/gerrit.access.log;
error_log /var/log/nginx/gerrit.error.log;
location / {
#auth_basic_user_file /home/gerrit/gerrit-etc/gerrit.passwd;
auth_basic "Gerrit User Authentication";
proxy_set_header X-Remote-User $remote_user;
proxy_pass
http://127.0.0.1:8081;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
#proxy_set_header Host $http_host;
proxy_redirect off;
proxy_http_version 1.1;
}
Please give some advice, thanks a lot.
Br,
Yingchun