Skip to content

fatal: Not a git repository (or any of the parent directories): .git #38

Closed
@tielur

Description

@tielur

I'm currently getting this issue when running tests. We use capistrano to deploy our code and we are using these settings:

set :deploy_via, :copy
set :copy_strategy, :export

Which allows us to push our code to our web servers without needing them to connect to our git servers and pull code. It basically does a sftp. more info

Unfortunately this means that there is not a git repository at the time the tests are run. Which it looks like the Formatter.to_payload uses as well as the PayloadValidator

I guess my question is does CodeClimate need this git repo information in order to function correctly? If not, how should we go about fixing this so it's not required to be run inside a git repository.

Also, is anyone else using this capistrano deploy method?

Logs:

Coverage = 69.48%. fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
Code Climate encountered an exception: CodeClimate::TestReporter::InvalidPayload
A git commit timestamp was not found in the test report payload
/jenkins-test/shared/bundle/ruby/2.0.0/gems/codeclimate-test-reporter-0.3.0/lib/code_climate/test_reporter/payload_validator.rb:16:in `validate'
/jenkins-test/shared/bundle/ruby/2.0.0/gems/codeclimate-test-reporter-0.3.0/lib/code_climate/test_reporter/payload_validator.rb:11:in `validate'
/jenkins-test/shared/bundle/ruby/2.0.0/gems/codeclimate-test-reporter-0.3.0/lib/code_climate/test_reporter/formatter.rb:17:in `format'
/jenkins-test/shared/bundle/ruby/2.0.0/gems/simplecov-0.8.2/lib/simplecov/result.rb:46:in `format!'
/jenkins-test/shared/bundle/ruby/2.0.0/gems/simplecov-0.8.2/lib/simplecov/configuration.rb:139:in `block in at_exit'
/jenkins-test/shared/bundle/ruby/2.0.0/gems/simplecov-0.8.2/lib/simplecov/defaults.rb:54:in `call'
/jenkins-test/shared/bundle/ruby/2.0.0/gems/simplecov-0.8.2/lib/simplecov/defaults.rb:54:in `block in <top (required)>'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions