我想开始使用bitbucket,我已经完成了教程的步骤来连接到他们的服务器.链接
配置文件总是出错.我使用的是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
Run Code Online (Sandbox Code Playgroud)
我的配置文件看起来像教程中的示例,带有我的ssh url.
配置内容有问题的文件是不是 ~/.ssh/config一个.
这是git配置(以某种方式复制了~/.ssh/config):
git config --local -l在你的回购中.git/config)git config --global -l(在你的主目录:~/.gitconfig)(我在这里假设系统git配置文件是正确的).
你需要:
\r\n而不是\n).~/.ssh/config使用bitbucket教程中描述的有关多个ssh密钥的内容恢复.一个~/.ssh/config文件应该是这样:
Host workdid
HostName bitbucket.org
IdentityFile ~/.ssh/workdid
Host personalid
HostName bitbucket.org
IdentityFile ~/.ssh/personalid
Run Code Online (Sandbox Code Playgroud)