-
Notifications
You must be signed in to change notification settings - Fork 0
Git
Since August 13, 2021, GitHub no longer accepts password authentication for command-line access. And we need to authenticate via a personal access token or use an SSH key.
References:
Create a new SSH key pair by running the following command:
❯ ssh-keygen -t ed25519 -C "[email protected]"
Note that specifying a reliable ED25519 algorithm to create the SSH key.
I use a noreply email address to hide my personal email address.
We can get it from the GitHub's Emails setting page.
And since I use the GPG key to sign my git commits, I use the noreply email address to sign them.
In the Step 1, A public key and a private key are created.
You can see the created key pairs in ~/.ssh
directory.
❯ pbcopy < ~/.ssh/CREATED_SSH_KEY.pub
And last, register the public key copied in Step 2 to GitHub. For details, see Adding a new SSH key to your GitHub account.
To register a private key with ssh-agent, run the following command:
❯ ssh-add --apple-use-keychain ~/.ssh/CREATED_SSH_KEY
❯ ssh -T [email protected]
Hi tokuda109! You've successfully authenticated, but GitHub does not provide shell access.