Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
c73eb55d
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c73eb55d
编写于
12月 20, 2017
作者:
N
Nick Thomas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use the new gitlab-shell authorized-keys helper in documentation
上级
8de1bb9e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
28 deletion
+6
-28
GITLAB_SHELL_VERSION
GITLAB_SHELL_VERSION
+1
-1
doc/administration/operations/fast_ssh_key_lookup.md
doc/administration/operations/fast_ssh_key_lookup.md
+5
-27
未找到文件。
GITLAB_SHELL_VERSION
浏览文件 @
c73eb55d
5.1
0.3
5.1
1.0
doc/administration/operations/fast_ssh_key_lookup.md
浏览文件 @
c73eb55d
...
...
@@ -25,34 +25,12 @@ GitLab Shell provides a way to authorize SSH users via a fast, indexed lookup
to the GitLab database. GitLab Shell uses the fingerprint of the SSH key to
check whether the user is authorized to access GitLab.
Create the directory
`/opt/gitlab-shell`
first:
```
bash
sudo mkdir
-p
/opt/gitlab-shell
```
Create this file at
`/opt/gitlab-shell/authorized_keys`
:
```
#!/bin/bash
if
[[
"
$1
"
==
"git"
]]
;
then
/opt/gitlab/embedded/service/gitlab-shell/bin/authorized_keys
$2
fi
```
Set appropriate ownership and permissions:
```
sudo chown root:git /opt/gitlab-shell/authorized_keys
sudo chmod 0650 /opt/gitlab-shell/authorized_keys
```
Add the following to
`/etc/ssh/sshd_config`
or to
`/assets/sshd_config`
if you
are using Omnibus Docker:
Add the following to your
`sshd_config`
file. This is usuaully located at
`/etc/ssh/sshd_config`
, but it will be
`/assets/sshd_config`
if you're using
Omnibus Docker:
```
AuthorizedKeysCommand /opt/
gitlab-shell/authorized_keys
%u %k
AuthorizedKeysCommand /opt/
embedded/gitlab-shell/bin/gitlab-shell-authorized-keys-check git
%u %k
AuthorizedKeysCommandUser git
```
...
...
@@ -70,7 +48,7 @@ Confirm that SSH is working by removing your user's SSH key in the UI, adding a
new one, and attempting to pull a repo.
> **Warning:** Do not disable writes until SSH is confirmed to be working
perfectly because the file will quickly become out-of-date.
perfectly
,
because the file will quickly become out-of-date.
In the case of lookup failures (which are not uncommon), the
`authorized_keys`
file will still be scanned. So git SSH performance will still be slow for many
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录