## Problem
Cloning repository on ubuntu
Solution
To clone a repo from codebase to ubuntu you need to create public key first.
ssh-keygen -t rsa -C "your_email@example.com"
# Creates a new ssh key, using the provided email as a label # Generating public/private rsa key pair. # Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
then enter the passphrase
Enter passphrase (empty for no passphrase): [Type a passphrase] # Enter same passphrase again: [Type passphrase again]
Which gives you sth like this:
Your identification has been saved in /Users/you/.ssh/id_rsa. # Your public key has been saved in /Users/you/.ssh/id_rsa.pub. # The key fingerprint is: # 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com
Once that is created you need to copy the key by navigating where the public key has been saved like this:
cd /home/ubuntu/.ssh
ls –la
cd .ssh
once here you can type this:
cat id_rsa.pub
cd .ssh cat id_rsa.pub
and then just copy and can then go to codebase under my profile->publish key add a new key and past it.