質問

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?

ジョブ構成でブランチをマスターに設定した 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?

ハドソンコンソールの出力:

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)

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

役に立ちましたか?

解決

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

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top