8

I can login the gerrit server and review code. But I can't log out by clicking sign out link on the upper-right when I click sign out, it will return to Code Review Dashboard page

Below is my httpd.conf and gerrit.config, please help me!!! tks...

<VirtualHost *>  
  ServerName localhost 
  ProxyRequests Off  
  ProxyVia Off  
  ProxyPreserveHost On  

  <Proxy *>  
        Order deny,allow  
        Allow from all  
  </Proxy>  

  <Location /login/>  
     AuthType Basic  
     AuthName "Gerrit Code Review"  
     AuthBasicProvider file  
     AuthUserFile /home/kk/gerrit/server/etc/passwords  
     Require valid-user  
  </Location>  

  ProxyPass / http://10.10.68.224:9091/
  ProxyPassReverse / http://10.10.68.224:9091/
</VirtualHost>  

gerrit.config

[gerrit]
    basePath = git
    canonicalWebUrl = http://10.10.68.224:9091/
[database]
    type = H2
    database = db/ReviewDB

[auth]
    type = HTTP
[sendemail]
    smtpServer = localhost
[container]
    user = kk
    javaHome = /usr/lib/jvm/java-6-sun-1.6.0.26/jre
[sshd]
    listenAddress = *:29418
[httpd]  
        listenUrl = proxy-http://10.10.68.224:9091/  
[cache]
    directory = cache
kane
  • 287
  • 3
  • 8

2 Answers2

13

I used a bad way to fix it. I add the following in auth section.

logoutUrl = http://aa:aa@10.10.68.224 
kane
  • 287
  • 3
  • 8
  • 3
    "Bad" is subjective... it may not be elegant but it's pretty much the only way to wipe out the credentials. This worked perfectly for me! – MartyMacGyver Aug 30 '12 at 22:39
  • So a simple way to logout is type 'xx:oo@' after 'http://' in your url bar then press Enter. – Joyer Mar 05 '15 at 10:06
4

You are using HTTP Basic authentication. There is no way to tell a browser to quit sending basic authentication credentials (other than closing the browser).

The following question and answers provide some additional information: How to logout user for basic HTTP authentication

Community
  • 1
  • 1
Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285