-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
argocd kustomize github ssh key #9631
Comments
i am facing this error too ComparisonError: rpc error: code = Unknown desc = my kustomization.yaml is below apiVersion: kustomize.config.k8s.io/v1beta1 resources: |
I was able to fix this with this approach: But it looks awful to patch argocd-repo-server to add private key to .ssh folder.. |
Hi @vvatlin I was able to fix the issue by following the above approach by modifying the repo-server deployment also made the readonlyfilesystem to false but i have to manually run the command inside the reposerver pod to get it synced successfuly argocd repo add git@github.com:vrajendra/terraformcode_sample --ssh-private-key-path ~/.ssh/id_rsa |
Hello . I was able to run the kustomize build locally with base as azure repo, but when I am trying to run the pipeline from azure devops I am getting this error lstat /__w/1/s/deployment/kustomize/overlays/dev/git@ssh.dev.azure.com:v3: no such file or directory': git cmd = '/usr/bin/git fetch --depth=1 origin HEAD': exit status 128 |
Error: accumulating resources: accumulation err='accumulating resources from 'https://dev.azure.com/xxxx/xxx/_git/repo?path=/k8s/backend/bases': yaml: line 27: mapping values are not allowed in this context': git cmd = '/usr/bin/git fetch --depth=1 origin HEAD': exit status 128 Could some one help me on this error |
use the following format you can remove the ref if you dont have a tag or branch and the kustomization file is in master branch |
https://dev.azure.com/org/project/_git/<base_repo>/k8s/backend/bases? I am going to use above one |
remove the ? and get your actual git url before base repo |
Still getting same error from azure pipeline Error: accumulating resources: accumulation err='accumulating resources from 'https://dev.azure.com/myorg/myproject/_git/my_repo/k8s/backend/bases': yaml: line 6: mapping values are not allowed in this context': git cmd = '/usr/bin/git fetch --depth=1 origin HEAD': exit status 128 |
@prasobhen I think you want to use kustomize . also your repo is a private azure repo with restrictions. please have look at here https://github.com/argoproj/argocd-example-apps/tree/master/plugins/kustomized-helm to setup the plugin to use it with argocd. make sure you are able test the kustomize build and the base repo URL in a standalone machine , if that works and if you setup the CMP plugin , you should resolve the issue. for private repository setup check this https://argo-cd.readthedocs.io/en/release-1.8/user-guide/private-repositories/ . make sure you have kustomization.yaml directly under the bases directory |
@prasobhen this thread is for argocd . and you mentioning azure pipeline, which i could not understand. may be this is not the thread |
@fantasticnaveen This is for argocd and when I run the kustomize build I am getting this error. is there anything I need to add additionally? |
@prasobhen from your machine test kustomize build base url and paste the output . Also tell me how you integrated kustomize in argocd |
resources:
transformers: This how my kustomization.yaml in the overlays |
@prasobhen from your machine test kustomize build and paste the output |
Error: accumulating resources: accumulation err='accumulating resources from 'https://dev.azure.com/myorg/myproject/_git/my_repo/k8s/backend/bases': yaml: line 6: mapping values are not allowed in this context': git cmd = '/usr/bin/git fetch |
what is line 6 in your kustomization.yaml . probably a syntax error . go to http://www.yamllint.com/ and find the error |
yaml file looks fine and also tried using ssh locally and build was working. But when I am using https I get above error. I will double check the authentication part and update |
you have use PAT. look here #6289 |
Yes I was checking internally by generation the PFA..I tried using PAT in in the Kustomization and it worked.. I will have to check option to pass the value in the pipeline. Thanks @fantasticnaveen for the suggestion |
I get this error with github. When using https. My format is: |
hitting the same issue... |
any plans to get this fixed, team? |
Hello.
I don't know how to use GitHub public repo with argocd and kustomize.
Here is an example:
When I use just kustomize on my laptop - everything is ok, because I have ssh private key.
But argocd failed with the error:
I've tried to create Secrets for repo with url
and my private key
Like this:
But It didn't help.
How can I fix this ?
The text was updated successfully, but these errors were encountered: