Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.81 KB

Naas_Automate_GitHub_Auth.md

File metadata and controls

42 lines (26 loc) · 1.81 KB



Template request | Bug report | Generate Data Product

Tags: #naas #asset #snippet #operations

Author: Jeremy Ravenel

Description: This notebook provides an automated way to authenticate with GitHub using Naas.

Input

No input required.

Model

Generate the public key:

!ssh-keygen -b 2048 -t rsa -f /home/ftp/.ssh/id_rsa -q -N ""

Output

Retrieve the public key by running the cell below:

cat /home/ftp/.ssh/id_rsa.pub

Then:

  • go Github/Settings/SSH and GCP keys
  • create new SSH key
  • paste the public key in the key section
  • name the public key and save

You just changed the way naas connects with GitHub for any repository.
It means you need to choose the SSH method to clone now but you can still use Git tab to push.

  • Click on File > New > Terminal
  • Type : git clone [email protected]:jravenel/my_project.git

This technique wil enable you to never use your Git username and password anymore.