Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding users to Gitolite

Tags:

git

ssh

gitolite

I'm trying to setup Gitolite but I'm running into a weird issue:

When I add a new public key file for a new user (say raphaelcruzeiro.pub), giolite sends me the following warning on push:

remote: 
remote:         ***** WARNING *****
remote:         the following users (pubkey files in parens) do not appear in the config file:
remote: raphaelcruzeiro(raphaelcruzeiro.pub)

And when I try to clone a repository with this user, I get a permission denied:

Cloning into gitolite-admin...
R access for gitolite-admin DENIED to raphaelcruzeiro
fatal: The remote end hung up unexpectedly

Am I missing something here? Where and how do I add the user to the configuration file?

Unfortunately Gitolite's documentation is rather vague on this matter.

like image 982
Raphael Avatar asked Apr 14 '11 19:04

Raphael


1 Answers

Here's the workflow for adding users to gitolite:

Add the users public key to the map keys as <username>.pub

Edit your gitolite config file (gitolite.conf), this file is in the map conf. When you open it, everthing will be clear.

example:

repo  someproject

  RW+ = darhuuk

  RW  = raphaelcruzeiro

  R   = santaclaus

Commit the new key and the modified config file. Then push it to your gitolite server.

That should do it!

[Edit] BTW, here is the gitolite paragraph that explains what I wrote above: http://gitolite.com/gitolite/conf.html.

like image 102
AVH Avatar answered Nov 15 '22 23:11

AVH