New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use GIT as a profile source #172

Closed
username-is-already-taken2 opened this Issue Dec 1, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@username-is-already-taken2

username-is-already-taken2 commented Dec 1, 2016

Cookbook version

0.2.3

Chef-client version

12.16.42

Platform Details

chef-client running on windows 2012 R2

Scenario:

Using the same node I am able to use the audit cookbook and call compliance profiles hosted on the chef-compliance server but I am getting an error when trying to run the profiles directly from git

Steps to Reproduce:

Same cookbook I am changing enviroment attributes to reference my git repo

{
  "audit": {
    "collector": "chef-server",
    "insecure": false,
    "profiles": [
      {
        "name": "compliance_constitution",
        "git": "https://git.*********.com/***/compliance_constitution.git"
      }
    ]
  }
}

Expected Result:

Should run my profile, I can run the profile successfully using inspec exec and the http://url to the same repo

Actual Result:

chef-client run failes

@chris-rock

This comment has been minimized.

Collaborator

chris-rock commented Dec 1, 2016

@username-is-already-taken2 Is git installed on that machine? We rely on native git command to be available

@username-is-already-taken2

This comment has been minimized.

username-is-already-taken2 commented Dec 1, 2016

@chris-rock No this server doesn't, I'll install it and give it ago.

I did try looking around the code to see how the git intergration works, but with my random clicking of files in the repo I wasn't able to determine that.

I was just thinking I might be able to raise a PR to fail with a better error if git was not found? Just thinking.

Anyway thanks for your help

@chris-rock

This comment has been minimized.

Collaborator

chris-rock commented Dec 1, 2016

@username-is-already-taken2 The git fetcher is implemented here https://github.com/chef/inspec/blob/master/lib/fetchers/git.rb#L149 It should output an appropriate error, but if you do not see it from the very beginning, we need to improve that.

@cheeseplus cheeseplus closed this Dec 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment