Azure Spring Apps - Config Server with SSH Authentication
Published Sep 09 2022 01:35 AM 2,302 Views
Microsoft

Here are the steps you can follow to configure the Config Server on Azure Spring Apps which uses SSH authentication to connect to a git repository on GitHub.


Create your keys using the following command on your terminal

ssh-keygen -m PEM -t rsa -b 4096 -C "test@mymail.com"

This will create a public key (.pub) and a private key.


Copy the public key on GitHub

Go to your GitHub account -> Settings -> SSH and GPG keys Click on New SSH key and copy the public key here.

Configure the Config Server on Azure Spring Apps

Go to the Azure Spring Apps Service -> Config Server
Specify the GitHub URL, Label etc. and choose SSH as the Authentication protocol. Copy your private key in the text box and save.

gaukazure_0-1662712230563.png


(Optional) To ensure that the key works, you can test it on the local system as well.

Refer: Clone GitHub Repository using SSH

eval "$(ssh-agent -s)"

ssh-add <private key>

git clone <GIT_URL>
#Example of the URL: git@github.com:username/testconfig.git

You should now have access to your private GitHub Repository via SSH from Azure Spring Apps.

Co-Authors
Version history
Last update:
‎Sep 09 2022 01:31 AM
Updated by: