3

bitbucket の使用を開始したいのですが、サーバーに接続するためのチュートリアルの手順を作成しました。リンク

設定ファイルには常に何か問題があります。ubuntu12.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 を使用して、チュートリアルの例のように見えます。

4

2 に答える 2

7

問題の構成コンテンツファイルは1 つではありません ~/.ssh/config

それはgit configです(どういうわけか にコピーされました~/.ssh/config) :

  • ローカルのもののいずれか:(
    git config --local -lあなたのレポ内.git/config
  • またはグローバルなもの:
    git config --global -l(ホームディレクトリ内: ~/.gitconfig)

(ここでは、システムの git 構成ファイルが正しいと仮定します)。

必要がある:

ファイルは次の~/.ssh/configようになります。

Host workdid
 HostName bitbucket.org
 IdentityFile ~/.ssh/workdid
Host personalid
 HostName bitbucket.org
 IdentityFile ~/.ssh/personalid
于 2013-07-30T10:31:35.097 に答える
4

あなたのssh-configファイル/root/.ssh/configには、あるべきgitの設定が含まれているようです/home/peter/Dropbox/C++/Qt/sql/.git/config

ssh と git は 2 つの異なるプログラムです。それらは相互に対話しますが、個別に構成されます。

また、ドロップボックスを使用して git-repo を保存しているようです。これは問題を引き起こす可能性があります#git@freenode:

12:19 <iveqy> !dropbox
12:19 -gitinfo(jast@infobot.gitrecipes.de)- Git リポジトリを DropBox に保存するのは非常に悪い考えです。無料のホスティング サービス (Bitbucket や GitHub など) を使用するか、リポジトリの破損を主張する場合は !dropbox_why を読んでください。
12:19 <iveqy> !dropbox_why
12:19 -gitinfo(jast@infobot.gitrecipes.de)- git は頻繁に変更される小さなファイルを大量に使用し、Dropbox の同期アルゴリズムはこれを無視します。複数のドロップボックス クライアントを使用すると、これがさらに複雑になり、面白い結果が得られます。

于 2013-07-30T10:17:57.577 に答える