Ric*_*ico 59 ssh config github
我正在尝试为多个SSH帐户创建一个.ssh/config文件(特别是对于github.com).我已经尝试了几个教程和github帮助演练,但似乎没有任何工作.
我创造了一个id_rsa_test
和id_rsa_test.pub
.我上传id_rsa_test.pub
到github.
然后我创建了一个~/.ssh/config
包含以下内容的文件:
# github account
Host github.com-test github.com
Hostname github.com
User git
IdentifyFile ~/.ssh/id_rsa_test
Run Code Online (Sandbox Code Playgroud)
和
# github account
Host github.com-test github.com
Hostname github.com
User git
IdentifyFile ~/.ssh/id_rsa_test.pub
Run Code Online (Sandbox Code Playgroud)
然后我尝试几个命令.即:
git clone git@github-test:username/my_project.git
git push
Run Code Online (Sandbox Code Playgroud)
...每次我收到以下错误:
/home/username/.ssh/config: line 5: Bad configuration option: IdentifyFile
/home/username/.ssh/config: terminating, 1 bad configuration options
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
有什么建议?
tom*_*tom 164
IdentityFile是't',而不是IdentifyFile.
归档时间: |
|
查看次数: |
26213 次 |
最近记录: |