Hello,
I am trying to install Gerrit on a Ubuntu 10.10 machine. I am new at
this and I'm taking baby steps.
I am trying to set auth mode to http.
I'm blocked now in HTTP server's authentication settings issue, the
HTTP server does not provide the the user name in the Authorization
header.
Environment:
Gerrit version 2.1.6.1.
I followed the steps suggested in the Installation guide.
- set up the the MySQL database
- created user gerrit2 (specified : --gecos 'Gerrit Code Review')
- run java -jar gerrit.war init -d review_site
No other configurations related to jetty, gitweb or other modules.
Files:
gerrit.config
[gerrit]
basePath = /home/vlad_trifan/test
[database]
type = MYSQL
hostname = localhost
database = reviewdb
username = gerrit2
[auth]
type = HTTP
[sendemail]
smtpServer = localhost
[container]
user = gerrit2
javaHome = /usr/lib/jvm/java-6-sun-1.6.0.22/jre
[sshd]
listenAddress = x.x.x.x:29418
[httpd]
listenUrl =
http://x.x.x.x:8080/
[cache]
directory = cache
In /etc/apache2/apache2.conf :
NameVirtualHost x.x.x.x:8080
<VirtualHost x.x.x.x:8080>
ServerName x.x.x.x
ProxyRequests Off
ProxyVia Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<IfModule mod_disk_cache.c>
CacheEnable disk /
CacheIgnoreHeaders Set-Cookie
</IfModule>
<Location "/ssh_info">
# ProxyPass
http://127.0.0.1:8080/ssh_info
Allow from all
Satisfy Any
</Location>
<Location /login/>
# ProxyPass
http://127.0.0.1:8080/
AuthType Basic
AuthName "Gerrit Code Review"
Require valid-user
</Location>
ProxyPass / http://.../
</VirtualHost>
The error message in browser :
Configuration Error
Check the HTTP server's authentication settings.
The HTTP server did not provide the username in the Authorization
header when it forwarded the request to Gerrit Code Review.
If the HTTP server is Apache HTTPd, check the proxy configuration
includes an authorization directive with the proper location, ensuring
it ends with '/':
In error_log:
ERROR com.google.gerrit.httpd.auth.container.HttpLoginServlet : Unable
to authenticate user by Authorization request header. Check container
or server configuration.
The big question :
What am I missing here?
Also , since I do not have an interface to add user and a public key ,
when I run :
ssh -p 29418 ger...@x.x.x.x
Permission denied (publickey).
Message from sshd_log
AUTH FAILURE FROM y.y.y.y user-not-found
Is this a separate issue?
Where and how could I inject the public key in the sql database, so I
could test connectivity behind HTTP Authorization.
/Vlad