S
S
strelkovandreyv2019-07-09 10:21:22
SSH
strelkovandreyv, 2019-07-09 10:21:22

How to set up SSH keys in Gitlab Runner on Windows?

Good afternoon, I'm trying to set up Gitlab + Gitlab Runner (Windows) on my intranet,
but it doesn't work when it comes to downloading project submodules.
Namely, there is a project on Gitlab, there is a collector on Windows OS, which is successfully connected to the gitlab.
I start setting up the build, until at least upload the repository to the builder, and everything works successfully, but except for
the submodules, i.e. the root project, its files and folders are successfully downloaded, and the submodules are just a folder without their contents.
The logs say that Host key verification failed and they say there is no access to these projects.
As I understand it, in some way the assembler could keep silent access to the project repository, but cannot connect to submodules
It seems like according to the documentation you need to set up SSH keys between the repositories and the collector (although it is strange, because without any configuration it successfully downloads the root project, but for some reason it cannot submodules)
To do this, I created 2 keys (public and private (without a password) ), on Gitlab to the home directory of the user from which the build is also launched, created an authorized_keys file in the .ssh folder
Where I placed the contents of the public key. Then, through Putty, I checked the connection using the private key to the gitlab - everything was successful
And here I have a plug, now it turns out that the gitlab collector should access the repository in the same way through this private key, but I don’t understand how to set it up, that is, it turns out that I need to do something so that the collector gives the private key to the repository for authorization and downloading as a project and submodules
Who has experience, tell me

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-07-09
@Zarom

Official documentation
https://docs.gitlab.com/ee/ci/ssh_keys/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question