Tools/Gitlab/sysconfig

De MonPtitSite
Révision datée du 1 juillet 2021 à 14:53 par Admin (discussion | contributions) (Page créée avec « {{MediaWiki}} <br> {{FOND_BLEU|Gitlab - éléments de '''configuration'''}} = Sites Références = * [https://docs.gitlab.com/ee Documentation Gitlab officielle] = Fi… »)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Sauter à la navigation Sauter à la recherche
Accueil SysAdmin Hobbies                  


Gitlab - éléments de configuration


Sites Références


Fichier de configuration pricipal

/etc/gitlab/gitlab.rb

configurer authentification AD

exemple de configuration :

### LDAP Settings
###! Docs: https://docs.gitlab.com/omnibus/settings/ldap.html
###! **Be careful not to break the indentation in the ldap_servers block. It is
###!   in yaml format and the spaces must be retained. Using tabs will not work.**

gitlab_rails['ldap_enabled'] = true

##! **remember to close this block with 'EOS' below**
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
  main: # 'main' is the GitLab 'provider ID' of this LDAP server
    label: 'Active Directory'
    #host: 'DC.example.com'
    #host: '10.11.12.13'   #DC
    port: 389  # 636
    uid: 'sAMAccountName'
    bind_dn: 'CN=bind_user,OU=xxxx,DC=www,DC=example,DC=com'
    password: 'MyGreatPassword'
    #encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
    encryption: 'start_tls' # "start_tls" or "simple_tls" or "plain"
    verify_certificates: true   # false
    active_directory: true
    allow_username_or_email_login: false
    lowercase_usernames: false
    block_auto_created_users: false
    base: 'DC=www,DC=example,DC=com'
    
    user_filter: '(memberOf:1.2.840.113556.1.4.1941:=CN=my_ad_group,OU=xx,OU=yyy,DC=www,DC=example,DC=com)'
    user_filter: ''
#     ## EE only
#     group_base: ''
#     admin_group: ''
#     sync_ssh_keys: false
#
#   secondary: # 'secondary' is the GitLab 'provider ID' of second LDAP server
#     label: 'LDAP'
#     host: '_your_ldap_server'
#     port: 389
#     uid: 'sAMAccountName'
#     bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
#     password: '_the_password_of_the_bind_user'
#     encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
#     verify_certificates: true
#     active_directory: true
#     allow_username_or_email_login: false
#     lowercase_usernames: false
#     block_auto_created_users: false
#     base: ''
#     user_filter: ''
#     ## EE only
#     group_base: ''
#     admin_group: ''
#     sync_ssh_keys: false
EOS