Set git ssh access for github or bitbucket

https://docs.github.com/en/github/getting-started-with-github/setting-your-username-in-git

Open a terminal

cd in the folder were you want to clone the repo:

$ cd directory/you/clone
$ git init
$ git config user.name “Your-Username” #can be different from your github username
$ git config user.email “your.email@example.com
$ ssh-keygen -t rsa -C “your.email@example.com

Enter file in which to save the key (/home/username/.ssh/id_rsa): /home/username.ssh/id_rsa

Copy the content of the id_rsa.pub in your Github settings in your profile.

Set Github local authentication to be able to clone and push:

http://kbroman.org/github_tutorial/pages/first_time.html