


At the prompt, "Type a secure passphrase.When it prompts to Enter a file in which to save the key (/Users/you/.ssh/id_rsa): Just press enter again. When it prompts to "Enter a file in which to save the key," press Enter. You will see the following in your terminal Generating public/private rsa key pair.Enter the following command with a valid email address that you use for github ssh-keygen -t rsa -b 4096 -C " ".If you don't find then go to step 2 otherwise follow step 3 Default public is one of the following d_dsa.pub, id_ecdsa.pub, id_ed25519.pub, id_rsa.pub. Enter ls -al ~/.ssh to see if existing SSH keys are present:Ĭheck the directory list to see if you already have a public SSH key.I followed this procedure for Mac.įirst Step: Checking if we already have the public SSH key. I was struggling with the same problem that's what I did and I was able to clone the repo.
#ADD SSH KEY TO SOURCETREE WINDOWS#
Perhaps this will be fixed in git for Windows soon, but this is the 2nd time I've wasted time on this issue. SshCommand = 'C:\\Windows\\System32\\OpenSSH\\ssh.exe' The fix was: git config -global core.sshCommand "'C:\Windows\System32\OpenSSH\ssh.exe'" I consider it a bug that this error message is used - it's misleading. I was relying on the Windows ssh-agent service to store my ssh key passphrases, so git (with it's separate version of openssh) couldn't read my private keys. I eventually figured out that the problem is that Git for Windows, and Windows, both have their own versions of openssh. Please make sure you have the correct access rights And was still getting these errors: : Permission denied (publickey).įatal: Could not read from remote repository. I was receiving the Permission denied (public key) error when trying to clone or pull from github and, and I'd followed all the instructions and verified that my SSH keys were setup correctly (from SSH's standpoint) using ssh -vT and ssh -vT. Git may be using a different openssh executable than you think it is. determine which corresponding private key must be associated from your local computerĪnother possibility on Windows, which is not covered in any of these answers, and is not covered in the git or github docs on troubleshooting:.check which key have been authorized on your github or gitlab account settings.If the user has generated a ssh public/private key pair set before That's it you should be good to clone and checkout.įurther information can be found at (thanks to Whitney) git config -global user.email forget to restart your command line to make sure the config is reloaded).Add your key to your account via the website.

