Tuesday, November 24, 2020

How to set up SSH keys in Azure Git | Setup Java project in Azure Git in Azure DevOps

How to set up SSH keys in Azure Repos and Setup WebApp in Azure Repo

project created in Azure Devops.
git client installed on your source or local machine.


Go to your visual studio home page. You should be able to go by clicking on the below URL.

Create a new project by clicking on New project and enter project details like below. This will create a project dashboard.

Once project is created, Click on Repos.

 Click on initialize link to add README.

Click on clone link on the top right hand side.
Click on SSH link
Click Manage SSH keys

Click Add

Go to any virtual machine you had setup that has both Java and Maven installed. If you would like to know how to create a Virtual Machine in Azure Cloud, click here to do so.

Create the SSH keys by executing the below command:
(If you already have keys generated, you can overwrite it or skip to next step to copy keys)

execute the below command to copy the keys:

cat ~/.ssh/id_rsa.pub

Add the public keys.
Once keys added into Azure DevOps, go to Repos, copy the SSH clone url

Go to your machine where you have installed Java, Maven, preferably your EC2. Execute this command:
git clone <ssh_url>

This should download the empty repo from Azure DevOps to local machine(or ec2).
now after cloning, it will create a folder with repo name..


ls -al to see the folder name after you cloned.

go inside that folder by
cd reponame

Now create the maven project executing the below command:
mvn archetype:generate -DgroupId=com.cf -DartifactId=MyAwesomeApp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

type git status --> to see the newly created project
git add *
git status

git commit -m "my first project check-in to Azure Git"
git push

Now go to Azure DevOps, Select the Repos —> Files —> you should see the project uploaded here.

Please watch the above steps on YouTube video:

1 comment:

  1. ‼️US government are giving out Financial Benefits (Financial Support) to citizens and not everyone is aware about this, though not everybody is qualified but how will you know if you qualified without checking.

    Contact an agent for a quick check to know if you qualified for any benefits-:


DevOps Coaching Program Model Information | AWS Cloud Azure Cloud DevOps Coaching Program Model Information

Thanks for showing interest in learning DevOps. Believe it or not, anyone can become a successful DevOps engineer after finishing the excit...