modulr

Tutorials for Developers Laravel/AWS/Linux

Member-only story

Clone repo SSH from GitLab to Ubuntu EC2 AWS

--

We learning to generate SSH key in Ubuntu 22 and create deploy key in GitLab that clone repository in our server with SSH.

Step 1. Generate Key to server

In first step, we require to get key using bellow command, So open your terminal or command prompt and run bellow command:

ssh-keygen -t rsa -C "your_email@gmail.com" -b 4096
or
ssh-keygen -t ed25519 -C "your_email@gmail.com"

Show the created key

cat ~/.ssh/id_rsa.pub

Copy the key

Step 2. Create Deploy Key

In your GitLab repository go to Settings/Repository/Deploy Keys and create a new key.

If the deploy key is created successful will be display in the Enable deploy keys list, so now we are ready to clone our repository.

Step 3. Clone the repository

--

--

modulr
modulr

Published in modulr

Tutorials for Developers Laravel/AWS/Linux

Alfredo Barron
Alfredo Barron

Written by Alfredo Barron

Software Architect | Founder at Tráeme

No responses yet