• ᴥ •つ TOP
If you haven't yet, create a new SSH key in the ~/.ssh
folder.
Create the SSH configuration file in ~/.ssh
.
touch ~/.ssh/config
Add the new SSH key in your config
file.
Host github.com HostName github.com IdentitiesOnly yes UseKeychain yes IdentityFile ~/.ssh/id_ed25519
Add SSH key to MacOS' keychain:
ssh-add --apple-use-keychain `~/.ssh/id_ed25519`
Test the connection.
$ ssh-keyscan github.com >> ~/.ssh/known_hosts $ ssh -T [email protected] Hi rolemadelen! You've successfully authenticated, but GitHub does not provide shell access.
If you didn't, add the public key to GitHub Settings. This can be done via website or via GitHub CLI (gh
).
gh ssh-key add ~/.ssh/id_ed25519.pub