fizix100
fizix100

Reputation: 73

git ssh config file error

I'm trying to add multi ssh file in my Mac, I save my ssh config file as:

Host github
    HostName github.com
    User fizix100
    IdentityFile ~/.ssh/id_rsa_github

but it didn't work, and show me an error when I'm trying to pull remote files:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin 
/Users/fengzhenxing/.ssh/config: line 3: Bad configuration option: user:fizix100
/Users/fengzhenxing/.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.
Completed with errors, see above

Upvotes: 1

Views: 3826

Answers (1)

Abhijeet Kasurde
Abhijeet Kasurde

Reputation: 4127

Remove colon from User directive of your ssh config

Host github
    HostName github.com
    User fizix100
    IdentityFile ~/.ssh/id_rsa_github

Upvotes: 1

Related Questions