How to Configure CONFIG for GitHub

Create a public and private key:

ssh-keygen -t ed25519

I’d suggest renaming the files: e.g. github.private.key, github.public.key

Add your public key to your GitHub account.

Create “config” in your user’s .ssh directory:

        User <your github username here without brackets>
        PreferredAuthentications publickey
        IdentityFile /path/to/your/.ssh/private/key

See this GitHub article.