Wednesday, June 12, 2019

Setup SSH Git for Cloning Source from Azure Devops

Hi guys,

I wanna share the steps that I did in setting up SSH for Git.
So, I want to clone source from Azure Devops (you can imagine it as Github) via ssh.

Create and Add SSH Key

1. Check whether you already have ssh key or not
ls -al ~/.ssh

If belows file aren't shown, it means you don't have ssh key:
id_rsa --> this is your private key
id_rsa.pub --> this is your public key


2. Create new key
ssh-keygen

3. Login into Azure Devops account and Click your picture ID

4. Choose Security > SSH Public Keys > Add.
Fill in field "Description" and copy your id_rsa.pub content to field "Field Data"

5. Click Save

6. ssh-add from terminal

Clone source with SSH

1. Copy the ssh url from the repository/source that you want to clone
2. Open terminal in your leptop, click
git clone [repository ssh url]


That's all, good luck :D

Reference: https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops

No comments:

Post a Comment

Followers