This short script glgl(say 'guruguru')-http-auth provides a slightly convinient access way to GitLab (i.e. git clone http://gitlab.foo.com/git/my-project.git
with GitLab accounts). GitLab is a web interface which has github-like interface. Gitolite is so convinient for SSH, and is capable for Smart HTTP. In case of Smart HTTP, gitolite needs apache authentication mechanism, which does not satisfy convinient use for GitLab.
This glgl-http-auth bridges GitLab and gitolite with HTTP authentication and access. This is so simple script. With this script, you can access the repository of your GitLab with your GitLab account.
AS IS.
GitLab-http is written in WSGI application. Requires web server and mod_wsgi.
- Python 2.5+
- apache 2.2.x
- GitLab 2.0/2.1
- gitolite
- mod_wsgi
- py-bcrypt 0.2 -- http://pypi.python.org/pypi/py-bcrypt/
-
setup apache, GitLab, gitolite
-
place glgl-http-auth into proper path (ex. with SuexecUserGroup, the script must be placed into under the DocumentRoot for restriction of apache.)
# cd /var/www # mkdir gitlab-http # cd gitlab-http # cp /path/to/glgl-http-auth . # chmod +x glgl-http-auth
after that, modify the head of glgl-http-auth for your environment.
-
edit apache configuration
An example for apache is example.conf. Modify ScriptAlias and WSGIAuthUserScript.
If the script has been installed correctly, you can access the repository below.
% git clone http://gitlab.foo.com/git/my-project.git
This script provides authentication with GitLab web interface and wraps gl-auth-command of gitolite.
- For hooking the authentication process of apache, this used mod_wsgi.
- The handler for WSGIAuthUserScript attempts sign-in on GitLab. WSGIAuthUserScript hooks user authentication and call check_password() in the specified script.
- If success, glgl-http-auth translate GitLab's email to identifier in gitolite using GitLab production.sqlite3 DB directly.
- After that, the script passes identifier in gitolite to
gl-auth-command
.
Thanks for getting interested in this script. I am pleased if helpful.
Nobuo OKAZAKI