5

Hudson 用の Git プラグインを使用すると、オンラインの git リポジトリ (git://github.com/ithena/orm2dsl.git) から最新のソースを取得するときに、ジョブが常に失敗します。

git プラグインが最初に正常に実行されgit fetchます。次に、 を実行しようとしgit checkout -f origin/ますが、以下に示すように失敗します。これは私の git リポジトリの問題ですか、それとも意味のないチェックアウト コマンドですか?

ジョブ構成にブランチが設定されていない Git コマンド:

git checkout -f origin/
git checkout: updating paths is incompatible with switching branches/forcing
Did you intend to checkout 'origin/' which can not be resolved as commit?

ジョブ構成でブランチを master に設定した Git コマンド:

git checkout -f origin/master
git checkout: updating paths is incompatible with switching branches/forcing
Did you intend to checkout 'origin/master' which can not be resolved as commit?

Hudson コンソール出力:

started
Checkout
[workspace] $ git fetch
Checking out origin/
[workspace] $ git checkout -f origin/
git checkout: updating paths is incompatible with switching branches/forcing
Did you intend to checkout 'origin/' which can not be resolved as commit?
FATAL: Error checking out origin/
java.lang.RuntimeException: Error checking out origin/
    at hudson.plugins.git.GitAPI.launch(GitAPI.java:101)
    at hudson.plugins.git.GitAPI.checkout(GitAPI.java:94)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:90)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:693)
    at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:266)
    at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:239)
    at hudson.model.Run.run(Run.java:842)
    at hudson.model.Build.run(Build.java:88)
    at hudson.model.ResourceController.execute(ResourceController.java:70)
    at hudson.model.Executor.run(Executor.java:90)

Hudson 環境: Debian Etch、Sun JSDK 6、git 1.4.4.4、hudson の最新の安定版ダウンロード

4

1 に答える 1

3

まず、Git のバージョンがかなり古いです。他のことをする前に更新することをお勧めします。

2 つ目git checkout -f origin/は、有効なコマンドではありません。ブランチをチェックアウトする必要があるか、(コミット ハッシュまたはタグを指定して) コミットをチェックアウトし、同時に (を使用してgit checkout -b new-branch commit-hash) 新しいブランチを作成することができます。詳細については、git-checkout の man ページを参照してください。

于 2009-01-31T19:39:17.987 に答える