On Thursday 19 June 2014 20:57:19 Mario Harvey wrote: > > In the past I have used git management software that allows users to be > added from the ldap without needing to login or have knowledge of the > user's password. > > Does that functionality exist in Gitlab? I have configured the ldap and I > am able to see users if they login but I am unable to add any users that > haven't logged in. > > The reason I ask is because I am attempting to use Gitlab in large > enterprise environment and want to have admins responsible for adding > users. If this functionality doesn't exist are there any workarounds?
I had the same question. Today after reading your post and the announcement of the gitlab ruby gem I tried to find a solution for that. I played a little bit with the gitlab ruby gem and found out that the gitlab api supports creating ldap users and managing there permissions and ssh keys. I managed to create a gitlab account for a ldap user and add them to a group using the gitlab ruby gem. But of course you can use the api with any other language... Ruby example (replace <group id> and <permission>): require 'gitlab' Gitlab.endpoint = 'https://example.net/api/v3' Gitlab.private_token = 'qEsq1pt6HJPaNciie3MG' options={"username"=>"ldapusername", "name"=>"Ldap User", "provider"=>"ldap", "extern_uid"=>"cn=Ldap User,ou=user,dc=EXAMPLE,dc=COM"} g = Gitlab.client info=g.create_user('[email protected]','xxxxxx',options) g.add_group_member(<group id>,info.id,<permission>) To find out the <group id> you can use the gitlab CLI: gitlab groups And you get the permissions of a user for a group with (access_level): gitlab group_members <group id> regards Markus Köberl -- Markus Koeberl Graz University of Technology Signal Processing and Speech Communication Laboratory E-mail: [email protected] -- You received this message because you are subscribed to the Google Groups "GitLab" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/gitlabhq/201406231527.12970.markus.koeberl%40tugraz.at. For more options, visit https://groups.google.com/d/optout.
