Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to find git in atlassian/kubectl-run:3.2.0

Thomas Skovsende May 10, 2022

I am trying to run kubectl kustomize with my kustomization.yaml having remote resources, but it then fails with the following error:

 

Error:
accumulating resources:
accumulation err='accumulating resources from 'torx': '/opt/atlassian/pipelines/agent/build/kubernetes/overlays/dev/torx' must resolve to a file':
recursed accumulation of path '/opt/atlassian/pipelines/agent/build/kubernetes/overlays/dev/torx':
accumulating resources: accumulation err='accumulating resources from '../../../base':
'/opt/atlassian/pipelines/agent/build/kubernetes/base' must resolve to a file':
recursed accumulation of path '/opt/atlassian/pipelines/agent/build/kubernetes/base':
accumulating resources:
accumulation err='accumulating resources from 'git@bitbucket.org:xxx/xxx.git/xxx/xxx/?ref=master':
evalsymlink failure on '/opt/atlassian/pipelines/agent/build/kubernetes/base/git@bitbucket.org:xxx/xxxx.git/xxx/xxx/?ref=master' :
lstat /opt/atlassian/pipelines/agent/build/kubernetes/base/git@bitbucket.org:xxx:
no such file or directory':
no 'git' program on path:
exec:
"git":
executable file not found in $PATH

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 12, 2022

Hi @Thomas Skovsende

Welcome to the community.

For us to further check, would it be possible for you to share the following?
Please do mask any sensitive values/credentials you may have before sharing your configurations

  1. Could you share the base Docker image you're using in your bitbucket-pipelines.yml file?
  2. Would you be able to share your Pipes script as well?
  3. When you run the Pipes script(atlassian/kubectl-run), would you be able to add the variable DEBUG: 'true' (if you haven't done it) and see if you're seeing other errors there?

Let me know how it goes.

Regards,
Mark C

Thomas Skovsende May 22, 2022

Sure:

 

pipelines:
default:
- step:
name: Validate Kubernetes Yaml
script:
- pipe: atlassian/kubectl-run:3.2.0
variables:
DEBUG: 'true'
KUBE_CONFIG: ''
KUBECTL_COMMAND: kustomize ./kubernetes/overlays/dev
caches:
- docker

 

Output seems to be the same:

Error: accumulating resources: accumulation err='accumulating resources from 'torx': '/opt/atlassian/pipelines/agent/build/kubernetes/overlays/dev/torx' must resolve to a file': recursed accumulation of path '/opt/atlassian/pipelines/agent/build/kubernetes/overlays/dev/torx': accumulating resources: accumulation err='accumulating resources from '../../../base': '/opt/atlassian/pipelines/agent/build/kubernetes/base' must resolve to a file': recursed accumulation of path '/opt/atlassian/pipelines/agent/build/kubernetes/base': accumulating resources: accumulation err='accumulating resources from 'git@bitbucket.org:xxx/xxx.git/deployment/kubernetes/?ref=master': evalsymlink failure on '/opt/atlassian/pipelines/agent/build/kubernetes/base/git@bitbucket.org:xxx/xxx/deployment/kubernetes/?ref=master' : lstat /opt/atlassian/pipelines/agent/build/kubernetes/base/git@bitbucket.org:xxx: no such file or directory': no 'git' program on path: exec: "git": executable file not found in $PATH
✖ kubectl kustomize ./kubernetes/overlays/dev failed.

 

Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 26, 2022

Hi @Thomas Skovsende

Thanks for sharing that information.
It is indeed the same error message.
Going through the error message, it seems you're cloning the repository via SSH protocol.

For that, may I know if you can clone the repository on Pipelines just fine using SSH protocol?
You can clone it using the below command before your Pipes script.

        script:
- git clone git@bitbucket.org:xxx/xxx.git
- pipe: atlassian/kubectl-run:3.2.0
variables:
DEBUG: 'true'
KUBE_CONFIG: ''
KUBECTL_COMMAND: kustomize ./kubernetes/overlays/dev

Let's see if you're able to clone the repository.


Regards,
Mark C

Thomas Skovsende May 29, 2022

No, that would give me an access denied. I then created a ssh key pair for my pipeline and added it to the repos my kustomization file referred to(I suppose that would be what you would suggest next). This made the git clone work, but kubectl -k still fails with the same error as before - that git isn't in the path:

 

Error: accumulating resources: accumulation err='accumulating resources from 'torx': '/opt/atlassian/pipelines/agent/build/kubernetes/overlays/dev/torx' must resolve to a file': recursed accumulation of path '/opt/atlassian/pipelines/agent/build/kubernetes/overlays/dev/torx': accumulating resources: accumulation err='accumulating resources from '../../../base': '/opt/atlassian/pipelines/agent/build/kubernetes/base' must resolve to a file': recursed accumulation of path '/opt/atlassian/pipelines/agent/build/kubernetes/base': accumulating resources: accumulation err='accumulating resources from 'git@bitbucket.org:xxx/xxx.git/deployment/kubernetes/?ref=master': evalsymlink failure on '/opt/atlassian/pipelines/agent/build/kubernetes/base/git@bitbucket.org:xxx/xxx.git/deployment/kubernetes/?ref=master' : lstat /opt/atlassian/pipelines/agent/build/kubernetes/base/git@bitbucket.org:xxx: no such file or directory': no 'git' program on path: exec: "git": executable file not found in $PATH
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 30, 2022

Hi @Thomas Skovsende

Thanks for doing that and for providing additional information.

I went ahead and created a support ticket for us to continue to investigate this.

You should be able to receive an email notification about it.

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events