12

ここで説明されているように、裸の git リポジトリを Gitlab にインポートします。これは、git リポジトリとして認識されなかったためです。ただし、94K の大きな「空の」リポジトリが作成されます (元のリポジトリは 2.8GB です)。

$ bundle exec rake gitlab:import:repos RAILS_ENV=production
fatal: Not a git repository (or any of the parent directories): .git
Processing test.git
INFO: Sidekiq client using redis://localhost:6379 with options:namespace=>"resque:gitlab"}
 * Created test (test.git)
Done!

回避策として、空のプロジェクト フォルダー (インポート トライアルで作成されたもの) をベア リポジトリに置き換えます。その後、ツリーを作成してリモートからレポを複製すると、次のエラーが発生します。

$ git clone git@mydomain.com:...test.git
Cloning into 'test'
fatal: '...test.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

ただし、git ユーザーには、必要なすべての権限が必要です。- 多分私は何か見落としがありますか?

私のシステム: RHEL6.3、Git 1.8.3.4、Gitlab5.3。

Gitlab には通常のリポジトリ (非ベア) が必要ですか? または、私の問題は何ですか?

4

4 に答える 4

13

Gitlab には通常のリポジトリ (非ベア) が必要ですか?

いいえ、gitlab が管理するすべてのリポジトリはベア リポジトリです。

君は見るべきだ:

/home/git/repositories/user1/repo1.git
/home/git/repositories/user1/repo2.git
/home/git/repositories/greoup1/repo3.git
...

test.gitフォルダー (およびその中のベア リポジトリ ファイル)の権限が、下にある既存のベア リポジトリと同じであることを確認してください/home/git/repositories/

インポートが機能しない場合は、「空のプロジェクト フォルダー (インポート トライアルで作成された) を私のベア リポジトリに置き換える」必要があります。

ただし、GitLab によって作成された空のベア リポジトリ ( 内~git/repositories/arepo.git/hooks) にあったフックが完全なベア リポジトリにコピーされ、空のリポジトリ (同じパス) が置き換えられていることを確認する必要があります。入って
いたものもチェック~git/repositories/arepo.git/info~git/repositories/arepo.git/config

デバッグするには、まず、失敗したインポート中に GitLab によって作成された空のベア リポジトリのクローンを作成してみてください。
次に、それを自分のものに置き換え、フックを再確認して、もう一度やり直してください。


OPで言及され、GitLabの「トラブルシューティングガイド」に記載されているように、正しいssh URLは次のとおりです。

git@git.myserver.com:repositories/mygroup/proj1.git

:repositories述べた。


裸のリポジトリをインポートするには ( Sytse Sijbrandij が以下と で述べているようにraketasks/import.md)

  • git repos_path の下にベア リポジトリをコピーします (「参考文献」を参照config/gitlab.yml gitlab_shell -> repos_path) 。
  • 以下のコマンドを実行します

    bundle exec rake gitlab:import:repos RAILS_ENV=production
    
于 2013-08-13T16:58:40.043 に答える
13

この機能のドキュメントについては、https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/import.mdを参照してください。

于 2014-04-30T13:05:04.410 に答える
3

私はそれを持ってます!私のsshパスに欠落しているディレクトリでした。この問題はすでにここで追跡されています。

申し訳ありませんが、エラー メッセージはそれほど明白ではありませんでした。これが私のような他のGitlab初心者の助けになることを願っています:)

于 2013-08-14T17:53:34.093 に答える