Question

Lorsque j'utilise le plug-in Git pour Hudson, mon travail échoue toujours lors de l'extraction des dernières sources depuis mon référentiel git en ligne (git: //github.com/ithena/orm2dsl.git).

Le plugin git s'exécute d'abord git fetch avec succès. Ensuite, il tente d’exécuter git checkout -f origin/, ce qui échoue comme indiqué ci-dessous. Est-ce un problème avec mon référentiel git ou est-ce que la commande de paiement n'a aucun sens?

Commande Git sans branche définie dans la configuration du travail:

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?

Commande Git avec branche définie sur maître dans la configuration du travail:

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?

Sortie de la console 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)

Environnement Hudson: Debian Etch, Sun JSDK 6, git 1.4.4.4, le dernier téléchargement stable d'Hudson

Était-ce utile?

La solution

Tout d’abord, votre version de Git est assez ancienne. Je vous suggère de le mettre à jour avant toute chose.

Deuxièmement, git checkout -f origin/ n'est pas une commande valide. Vous devez soit extraire une branche, soit vous pouvez extraire une validation (en spécifiant le hachage de validation ou une balise) et en créer une nouvelle en même temps (avec git checkout -b new-branch commit-hash). Consultez la page de manuel de git-checkout pour plus de détails.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top