Hi
I’m trying to setup gitlab CI. I need to understand how to install ssh to be able to copy files to the webserver.
Im reading these two docs: https://docs.gitlab.com/ee/ci/ssh_keys/README.html https://docs.gitlab.com/ee/ssh/README.html#generating-a-new-ssh-key-pair
I would like to make this yml work for me: https://medium.com/@hfally/a-gitlab-ci-config-to-deploy-to-your-server-via-ssh-43bf3cf93775
I have created the ssh key on the webserver and on the gitlab server I added the public key. And then I set varaible SSH_PRIVATE_KEY as the private key.
When I run pipeline I get: Permission denied (publickey,password).
Do I need to do anyting on the gitlab runner macchine?
Br
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, Br
You need to copy the public key from the gitlab runner macchine (id_rsa.pub) in the authorized_keys file in the server where you want to connect.
Basically the public key - id_rsa.pub needs to be added in the authorized_keys file on the server where you will copy the files.
If you’re having any issues you can also paste the content of the /etc/ssh/ssh_config file as well.
Let me know if you have any questions.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.