chart-testing icon indicating copy to clipboard operation
chart-testing copied to clipboard

"Must be in a git repository" - error could be a bit clearer

Open emmeowzing opened this issue 4 years ago • 1 comments

Is this a request for help?: No


Is this a BUG REPORT or FEATURE REQUEST? (choose one): FEATURE REQUEST

Version of Helm and Kubernetes:

Running locally in act to test GitHub actions (via https://github.com/helm/chart-testing-action). Helm version is 3.4.0, ct version is 3.4.0, the default set in that repository (https://github.com/helm/chart-testing-action/blob/main/ct.sh#L7).

What happened:

I was not able to run ct lint due to the following errors:

| Linting charts...
| ------------------------------------------------------------------------------------------------------------------------
| No chart changes detected.
| ------------------------------------------------------------------------------------------------------------------------
| Error: Error linting charts: Error identifying charts to process: Must be in a git repository
| Error linting charts: Error identifying charts to process: Must be in a git repository

I lost a lot of time before realizing that the problem was very simple - git just wasn't installed in the testing container.

What you expected to happen:

ct lint to check configured repositories specified/listed in --config-file.

How to reproduce it (as minimally and precisely as possible):

Run ct <command> without git installed.

Anything else we need to know:

Maybe an edit to this string would suffice, recommending to ensure git is installed, not just that the current working directory doesn't appear to be configured as a git repo.

emmeowzing avatar Sep 29 '21 18:09 emmeowzing

I think this is the string that could be updated -

https://github.com/helm/chart-testing/blob/ba5aed29ec88e9fc187915f115890cb174999a3c/pkg/chart/chart.go#L698

but I could be wrong. Was just a little misleading.

emmeowzing avatar Sep 29 '21 18:09 emmeowzing

@bjd2385 I know this was an absolute age ago - but I hit the same issue, and it worked with 3.5.1

It doesn't with 3.7.1 though..

thepaulmacca avatar Feb 17 '23 15:02 thepaulmacca

@bjd2385 I know this was an absolute age ago - but I hit the same issue, and it worked with 3.5.1

It doesn't with 3.7.1 though..

Second that

WLauret avatar Mar 02 '23 13:03 WLauret

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Nov 16 '23 01:11 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Nov 21 '23 01:11 github-actions[bot]