0

When I am trying to clone a Github Repo to my desktop using SSH, I am getting the following error

Cloning into 'prework-about-me'...
/Users/eugeneho/.ssh/config line 4: garbage at end of line; ".ssh/id_rsa".
/Users/eugeneho/.ssh/config: terminating, 1 bad configuration options
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Here is what my config file looks like

eugeneho@Eugenes-MacBook-Pro .ssh % cat config
Host *
 AddKeysToAgent yes
 UseKeychain yes
 IdentityFile ~/ .ssh/id_rsa

This is what my id_rsa file looks like

-----BEGIN OPENSSH PRIVATE KEY-----
(my key is here)
-----END OPENSSH PRIVATE KEY-----

This is my file structure File structure

1 Answer 1

3

It seems like there is an unnecessary space in your ~/.ssh/config file:

IdentityFile ~/ .ssh/id_rsa
               ^
Sign up to request clarification or add additional context in comments.

2 Comments

How do you remove the unnecessary space in the ~/.ssh/config file? I didn't manage to google my way to the answer.
@SebastiantenBerge The same you remove any symbol in a text file; with a text editor and your computers backspace or del key. Are you sure you have the exact same error message?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.