A
A
Andrey Strelkov2019-01-22 11:15:34
Continuous Integration
Andrey Strelkov, 2019-01-22 11:15:34

How to use Deploy Keys in GitLab for CI/CD?

Good afternoon, please tell me, a newbie in these matters
. There is GitLab CE, which, in addition to storing code, is also used as a CI / CD.
The build machine is successfully configured, and successfully builds .Net sites and deploys them to IIS using WebDeploy. Everything works, no issues.
Now another question has arisen, a project has appeared that uses an additional project from the repository (submodule), by default out of the box when I try to restore the necessary packages with the same nuget, it does not find packages in this add. project, because Gitlab did not pull it, for this I added the GIT_SUBMODULE_STRATEGY variable with the value normal to the project settings.
The builder started to try to pull additional repositories, but failed, error Host key verification failed.
As I understand it, the additional repository is closed for him, and he cannot pull data from there.
I started to google, and googled such an ideology, but it’s not a fact that I understood correctly, the gitlab documentation writes that there are several options, one of which is that, roughly speaking, a certain user is created, he’s also allowed to develop or mantainer of this project in which he doesn’t let an SSH key is created for this user, and with the help of this key, somehow in the gitlab-ci.yml file, it is given away, thereby, as it were, logging in to the repository and gaining read access to
it admin.
As I understand it, the admin generates any SSH key and creates it in the Deploy keys admin panel under some name, for example, all-access,
Further, the developer already, if he wants to share his repository for the deployment of other developers (their projects), then he goes into his project settings, into the repository settings, and activates the key previously created by the admin in the Enabled Deploy Keys mode
Something like that.
Help me to understand

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-01-22
@Zarom

Based on the message "Host key verification failed", I think you have a problem, which is described in the documentation https://docs.gitlab.com/ee/ci/ssh_keys/#verifying-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question