如何将 Linux 用户导入到 GitLab?

How to import Linux user to GitLab?

我们的项目有很多用户使用 git 个存储库。

这些用户通过 ssh://xxxx@reponame 使用 TortoiseGit 访问 git 个存储库。

现在我正在准备 GitLab 并将我的存储库放入 /var/opt/gitlab/git-data/reporitories/root,然后通过以下命令将它们导入 GitLab。

# gitlab-rake gitlab:import:repos

登录GitLab好像没问题

现在如何将 /home/xxx 用户导入 GitLab?

GitLab好像是用LDAP来管理用户的,请问GitLab或者LDAP有什么好用的功能吗?

Gitlab 提供多种认证方式。 Gitlab 可以自己管理用户帐户,也可以使用 LDAP 等外部服务。有关完整列表及其配置方法,请查看 GitLab Integration documentation.

GitLab 提供了一个 API 可以用来自动添加新用户。您需要为此创建一个脚本,但如果您有数十个用户,这是值得的。实际上有一个我以前没有听说过的 python 模块 pyapi-gitlab for this API. I also stumbled on a quick search over a tool called python-gitlab。可能值得一试。

This documentation 可能有助于将 现有 用户添加到已有的群组