OS X + Git just plain doesn't work

Follow

Comments

4 comments

  • Avatar
    janmejay

    Hi Dave,


    Are you seeing this error on the server or agent? If you are facing this problem on the server, can you please send us the server logs? 


    The log file location for go-server and go-agent log files are /Library/Application Support/Go Server/go-server.log and /Applications/Go Agent.app/go-agent.log respectively.


    Additionally can you please send us the git version the box has? If you have used portage(or have compiled the source yourself), can you please send us the patch-number as well?.


    Regards,
    Janmejay 

  • Avatar
    janmejay

    By portage I meant MacPorts. Sorry for the confusion.


    Regards,
    Janmejay 

  • Avatar
    hobodave

    git version 1.7.4.1



    2011-04-11 10:45:12,063  INFO [603629076@qtp-1300857109-17] PipelineScheduler:103 - Manual trigger of pipeline 'test' requested.

    2011-04-11 10:45:12,066  INFO [603629076@qtp-1300857109-17] PipelineScheduler:112 - Processed manual trigger request for pipeline 'test' with result 'com.thoughtworks.cruise.serverhealth.ServerHealthState@5231ece[healthStateLevel=OK,type=<HealthStateType DATABASE_DISK_FULL LogScope[GLOBAL, scope=GLOBAL]>,message=,description=,expiryTime=<null>]'.

    2011-04-11 10:45:12,068  INFO [MessageListener for MaterialUpdateListener] MaterialDatabaseUpdater:75 - Material repository not found, creating with latest revision from GitMaterial{url=git://localhost/S4.git, branch='master', submoduleFolder='null'}

    2011-04-11 10:45:23,143 ERROR [MessageListener for MaterialUpdateListener] MaterialDatabaseUpdater:98 - Modification check failed for material: git://localhost/S4.git

    java.lang.RuntimeException: ERROR: fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.

    ERROR: Use '--' to separate paths from revisions

    at com.thoughtworks.cruise.domain.materials.git.GitCommand.gitLog(GitCommand.java:82)

    at com.thoughtworks.cruise.domain.materials.git.GitCommand.latestModification(GitCommand.java:66)

    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.thoughtworks.cruise.server.materials.MaterialDatabaseUpdater.insertLatestOrNewModifications(MaterialDatabaseUpdater.java:134)

    at com.thoughtworks.cruise.server.materials.MaterialDatabaseUpdater.addNewMaterialWithModifications(MaterialDatabaseUpdater.java:171)

    at com.thoughtworks.cruise.server.materials.MaterialDatabaseUpdater.initializeMaterialWithLatestRevision(MaterialDatabaseUpdater.java:108)

    at com.thoughtworks.cruise.server.materials.MaterialDatabaseUpdater.access$000(MaterialDatabaseUpdater.java:40)

    at com.thoughtworks.cruise.server.materials.MaterialDatabaseUpdater$1.doInTransaction(MaterialDatabaseUpdater.java:78)

    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.MaterialDatabaseUpdater.updateMaterial(MaterialDatabaseUpdater.java:76)

    at com.thoughtworks.cruise.server.materials.MaterialUpdateListener.onMessage(MaterialUpdateListener.java:29)

    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:680)

    Caused by: java.lang.RuntimeException: git reset failed for [pipelines/flyweight/cffaef27-78b3-4cd5-ab3b-cafcafe7e139]

    at com.thoughtworks.cruise.domain.materials.git.GitCommand.resetHard(GitCommand.java:138)

    at com.thoughtworks.cruise.domain.materials.git.GitCommand.fetchAndReset(GitCommand.java:124)

    at com.thoughtworks.cruise.domain.materials.git.GitCommand.fetchAndResetToHead(GitCommand.java:147)

    at com.thoughtworks.cruise.domain.materials.git.GitCommand.gitLog(GitCommand.java:79)

    ... 18 more

    2011-04-11 10:45:23,147 ERROR [MessageListener for MaterialUpdateStatusNotifier] BuildCauseProducerService:221 - not scheduling pipeline test after manual-trigger because update of material failed


    Please note that I changed my repository URL to see if it was somehow related. I have confirmed that I can manually clone from this url without issue. The agent log only contains these seemingly irrelevant lines:



    2011-04-10 02:06:05,609 [main     ] INFO  thoughtworks.cruise.util.Log4jDirectConfigurer:32 - created log4j file at [/Users/administrator/Downloads/Go Agent.app/log4j.properties]

    2011-04-10 02:06:05,799 [main     ] INFO  springframework.scheduling.timer.TimerFactoryBean:95 - Initializing Timer

    2011-04-10 02:06:05,801 [main     ] INFO  springframework.scheduling.timer.TimerFactoryBean:95 - Initializing Timer

    2011-04-10 02:06:05,802 [main     ] INFO  springframework.scheduling.timer.TimerFactoryBean:95 - Initializing Timer

    2011-04-10 02:06:07,190 [loopThread] INFO  cruise.agent.service.SslInfrastructureService:91 - Starting to register

    2011-04-10 02:07:18,816 [loopThread] INFO  cruise.agent.service.SslInfrastructureService:142 - Retrieved registration from Cruise server.

    2011-04-10 02:07:18,824 [loopThread] INFO  cruise.agent.service.SslInfrastructureService:149 - Stored registration for cert with hashcode: 3WWEuBj3QWnFVgfH0AuVbQ== not valid before: Wed Dec 31 18:00:00 CST 1969

    2011-04-10 02:07:18,824 [loopThread] INFO  cruise.agent.service.SslInfrastructureService:95 - Finished registering

  • Avatar
    janmejay

    Hi Dave,


    From what it looks like, it seems git is not seeing a ref named origin/master. When git clones a remote repo, it calls the corresponding branches origin/<remotes-local-branch-name>(origin being the remote name). The only way you can end up without any origin/master is when you have no branch on repository git://localhost/Users/hobodave/S4.git named 'master'.


    Can you please execute the following commands to find out what branches are actually available on the remote:


    $ git clone git://localhost/Users/hobodave/S4.git foo
    $ cd foo
    $ git branch -r


    If you have a branch named master, you should see origin/master in output of the last command.


    If you do not have a branch named 'master' you'll need to specify name of your CI branch in the material declaration in cruise-config. For instance, if you want to use a branch named ci-branch, your material configuration should look like: <git url="git://localhost/Users/hobodave/S4.git" branch="ci-branch" />


    Regards,
    Janmejay 

Please sign in to leave a comment.