开发者

Problems with Git and Go Server (Cruise)

I am trying to set up a new pipeline with Go and Git.

It hangs when I try to connect to Git via the Go Server 'Add pipeline' screen, and if I try to run a job using git I get this error:

2011-01-20 10:02:57,421 ERROR [MessageListener for MaterialUpdateListener] MaterialDatabaseUpdater:66 - Modification check failed for material: git@codaset.com:xxx/xxxxxx.git
java.lang.RuntimeException: Failed to run git clone command 
    at com.thoughtworks.cruise.util.ExceptionUtils.bomb(ExceptionUtils.java:24)
    at com.thoughtworks.cruise.domain.materials.git.GitMaterial.getGit(GitMaterial.java:163)
    at com.thoughtworks.cruise.domain.materials.git.GitMaterial.latestModification(GitMaterial.java:64)
    at com.thoughtworks.cruise.server.materials.LegacyMaterialChecker.findLatestModification(LegacyMaterialChecker.java:19)
    at com.开发者_JAVA百科thoughtworks.cruise.server.materials.MaterialDatabaseUpdater.insertLatestOrNewModifications(MaterialDatabaseUpdater.java:106)
    at com.thoughtworks.cruise.server.materials.MaterialDatabaseUpdater.addNewMaterialWithModifications(MaterialDatabaseUpdater.java:123)
    at com.thoughtworks.cruise.server.materials.MaterialDatabaseUpdater.initializeMaterialWithLatestRevision(MaterialDatabaseUpdater.java:76)
    at com.thoughtworks.cruise.server.materials.MaterialDatabaseUpdater.updateMaterial(MaterialDatabaseUpdater.java:57)
    at com.thoughtworks.cruise.server.materials.MaterialUpdateListener$1.doInTransaction(MaterialUpdateListener.java:33)
    at com.thoughtworks.cruise.server.transaction.TransactionCallback.doWithExceptionHandling(TransactionCallback.java:8)
    at com.thoughtworks.cruise.server.transaction.TransactionTemplate$1.doInTransaction(TransactionTemplate.java:20)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
    at com.thoughtworks.cruise.server.transaction.TransactionTemplate.executeWithExceptionHandling(TransactionTemplate.java:18)
    at com.thoughtworks.cruise.server.materials.MaterialUpdateListener.onMessage(MaterialUpdateListener.java:31)
    at com.thoughtworks.cruise.server.materials.MaterialUpdateListener.onMessage(MaterialUpdateListener.java:14)
    at com.thoughtworks.cruise.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:46)
    at com.thoughtworks.cruise.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:31)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.Exception: Failed to run git clone command
    at com.thoughtworks.cruise.util.ExceptionUtils.bombIfFailedToRunCommandLine(ExceptionUtils.java:34)
    at com.thoughtworks.cruise.domain.materials.git.GitMaterial.git(GitMaterial.java:182)
    at com.thoughtworks.cruise.domain.materials.git.GitMaterial.getGit(GitMaterial.java:161)
    ... 16 more

My pipeline config:

<pipeline name="TEST" labeltemplate="0.0.${COUNT}">
  <materials>
    <git url="git@codaset.com:xxx/xxxxxx.git" />
  </materials>
  <stage name="Complete">
    <approval type="manual" />
    <jobs>
      <job name="Deploy">
        <tasks>
          <exec command="echo" args="This should deploy" />
        </tasks>
      </job>
    </jobs>
  </stage>
</pipeline>

I can run git clone from CMD, and have confirmed that git is in my path.

I am running on Windows (32-bit), and get the same behaviour with Chrome and Firefox. Google is turning up nothing!

Anybody seen this behaviour before?


I was facing the same issue and then I tried with the url as

http://:@localhost:8181/scm/git/mygit.repo

and this works. Also if you see the material as user perspective you will notice the password is apeared as ******.


It looks like your cruise-config.xml configuration is not quite right for the Git material.

Try using HTTP as the protocol instead of the git@xxxx/yyy.git syntax e.g.

<git url="http://codaset.com/area/project.git" />

I have not seen the git@xxxx/yyy.git syntax used in any of our ~700 GO pipelines.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜