Git Clone Gives an Error

When I try to clone a private repository, i get this error

Cloning into 'repository-name'...
/etc/ssh/ssh_config: line 20: Bad configuration option: gssapikeyexchange
/etc/ssh/ssh_config: terminating, 1 bad configuration options
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

How can I solve this issue?

For Context, I created an SSH Key first but I accidentally did not add them to the ssh folder. So I restarted by deleting the keys manually by finding them(There were just 2 files). Created the new SSH key, worked fine, added the key to my github. But now, I am trying to clone this empty repository but it gives me the following error. The only thing I added to my ssh key file is the few lines that Github mentions in the instructions.

That error says SSH can’t load its configuration. The easiest solution is probably commenting out the gssapikeyexchange option. I’m surprised it causes errors (maybe your version of SSH was compiled without support for it?) but unless you have an unusual SSH setup you don’t need it, and it defaults to “off”. You definitely don’t need it to access GitHub over SSH.

If the repository exists on GitHub, it should available over SSH. No delay or anything like that. :slightly_smiling_face:

The SSH config does not generate a key, you need to do that separately if you haven’t already (using ssh-keygen). The IdentityFile option just tells SSH which key to use.

The error message you quoted above says that your version of SSH doesn’t understand the option at all, so you should probably remove it (or install GSSAPI support, if you really need it).