“错误的配置选项"在Linux终端上,在bitbucket ssh连接期间. [英] "Bad configuration option" on linux terminal, during bitbucket ssh connection.
问题描述
我想开始使用bitbucket,我已经完成了本教程的步骤以连接到他们的服务器. 链接
I would like to start to use bitbucket, I've made the tutorial's steps to connect to their server. link
配置文件总是有些错误.我使用ubuntu 12.10.
Bit something always wrong with the config file. I use ubuntu 12.10.
root@peter-VPCEH1M1E:/home/peter/Dropbox/C++/Qt/sql/.git# git push git@bitbucket.org:erbal/sql.git
/root/.ssh/config: line 1: Bad configuration option: [core]
/root/.ssh/config: line 2: Bad configuration option: repositoryformatversion
/root/.ssh/config: line 3: Bad configuration option: filemode
/root/.ssh/config: line 4: Bad configuration option: bare
/root/.ssh/config: line 5: Bad configuration option: logallrefupdates
/root/.ssh/config: line 6: Bad configuration option: ignorecase
/root/.ssh/config: line 7: Bad configuration option: [remote
/root/.ssh/config: line 8: Bad configuration option: fetch
/root/.ssh/config: line 9: Bad configuration option: url
/root/.ssh/config: line 10: Bad configuration option: [branch
/root/.ssh/config: line 11: Bad configuration option: remote
/root/.ssh/config: line 12: Bad configuration option: merge
/root/.ssh/config: terminating, 12 bad configuration optionsfatal: The remote end hung up unexpectedly
我的配置文件看起来像本教程中的示例,带有我的ssh url.
My config file looks like the example from the tutorial, with my ssh url.
推荐答案
所讨论的配置内容文件不是~/.ssh/config
.
The configuration content file in question is not the ~/.ssh/config
one.
这是 git配置(通过某种方式复制到~/.ssh/config
上):
It is the git config (which somehow got copied over the ~/.ssh/config
) :
- 其中一个是本地的:
git config --local -l
(在您的仓库.git/config
中) - 或全球范围:
git config --global -l
(在您的主目录中:~/.gitconfig
)
- either the local one:
git config --local -l
(in your repo.git/config
) - or the global one:
git config --global -l
(in your homedir:~/.gitconfig
)
(我将在这里假定系统git config文件是正确的).
(I will assume here that the system git config file is correct).
您需要:
- 检查这些文件的内容,以查找(例如)错误的eol(
\r\n
而不是\n
). - 使用有关多个ssh的bitbucket教程中描述的内容恢复
~/.ssh/config
键.
- check the content of those files, looking for (for instance) incorrect eol (
\r\n
instead of\n
). - restore the
~/.ssh/config
with the content described in the bitbucket tutorial about multiple ssh keys.
~/.ssh/config
文件应如下所示:
Host workdid
HostName bitbucket.org
IdentityFile ~/.ssh/workdid
Host personalid
HostName bitbucket.org
IdentityFile ~/.ssh/personalid
这篇关于“错误的配置选项"在Linux终端上,在bitbucket ssh连接期间.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!