How to reset or change the passphrase for a GitHub SSH key?

git, github, passphrase, ssh, ssh-keys

Solution

If you had generate a SSH-key with passphrase and then you forget your passphrase for this SSH-key,there's no way to recover it, You'll need to generate a brand new SSH keypair or switch to HTTPS cloning so you can use your GitHub password instead.

BUT,there are exceptions

If you configured your SSH passphrase with the OS X Keychain, you may be able to recover it.

- In Finder, search for the Keychain Access app.

- In Keychain Access, search for SSH.

- Double click on the entry for your SSH key to open a new dialog box.

- Keychain access dialogIn the lower-left corner, select Show password.

- You'll be prompted for your administrative password. Type it into the "Keychain Access" dialog box.

- Your password will be revealed.

Refer to Github help - How do I recover my SSH key passphrase?

Problem

I have forgoten my passphrase in Git. How do I reset it? I found two solutions on Stack Overflow, but I want to know what process to follow to reset it or to get it.

Original source

Related problems