Skip to content
代码片段 群组 项目
未验证 提交 da7ef78d 编辑于 作者: Marcel Amirault's avatar Marcel Amirault 提交者: GitLab
浏览文件

Merge branch 'mondot-master-patch-06533' into 'master'

Doc ssh_keys - To use an ssh key in gitlab ci/cd you always need to copy the public key to the servers

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/167172



Merged-by: default avatarMarcel Amirault <mamirault@gitlab.com>
Approved-by: default avatarMarcel Amirault <mamirault@gitlab.com>
Co-authored-by: default avatarMONDOT Quentin <quent.mondot@hotmail.fr>
No related branches found
No related tags found
无相关合并请求
......@@ -38,9 +38,9 @@ To create and use an SSH key in GitLab CI/CD:
at the end of the last line of the SSH key before saving it in the CI/CD settings.
1. Run the [`ssh-agent`](https://linux.die.net/man/1/ssh-agent) in the job, which loads
the private key.
1. Copy the public key to the servers you want to have access to (usually in
`~/.ssh/authorized_keys`) or add it as a [deploy key](../../user/project/deploy_keys/index.md)
if you are accessing a private GitLab repository.
1. Copy the public key to the servers you want to have access to (usually in `~/.ssh/authorized_keys`).
If you are accessing a private GitLab repository, you also need to add the public key as
a [deploy key](../../user/project/deploy_keys/index.md).
In the following example, the `ssh-add -` command does not display the value of
`$SSH_PRIVATE_KEY` in the job log, though it could be exposed if you enable
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册