2016-10-31 82 views
0

我想添加多SSH文件中我的Mac,我在我的ssh配置文件保存爲:混帳的ssh配置文件錯誤

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

,但它不工作,當我告訴我的錯誤「M試圖拉遠程文件:

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 
+0

嘗試使用新的配置文件,如錯誤消息我 -/users/fengzhenxing/.ssh/config:第3行:錯誤的配置選項:user:fizix100' –

+0

你有什麼錯誤信息,你已經編輯了你的ssh配置文件? – VonC

+0

@ fizix100如果它適合您,請接受答案。 –

回答

1

User指令你的ssh配置中刪除冒號

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