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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,576
Community Members
 
Community Events
176
Community Groups

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

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 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

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 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

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 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

Atlassian Community Events