argocd-image-updater icon indicating copy to clipboard operation
argocd-image-updater copied to clipboard

git write back method with ssh and github app tells secret does not contain field username

Open yasharne opened this issue 2 years ago • 2 comments

Describe the bug I'm using github app to pull images on the argocd and it is working as expected, the name of the secret is repo-1275005290 When I try to use this cred in the argocd image updater, I get this error:

level=error msg="Could not update application spec: could not get creds for repo 'https://github.com/XXX/helm-charts': invalid secret argocd/repo-1275005290: does not contain field username" application=YYY

Here are my annotations:

    argocd-image-updater.argoproj.io/image-list: myimage=us-east1-docker.pkg.dev/AAA/dev/YYY
    argocd-image-updater.argoproj.io/myimage.helm.image-name: image.repository
    argocd-image-updater.argoproj.io/myimage.helm.image-tag: image.tag
    argocd-image-updater.argoproj.io/myimage.update-strategy: latest
    argocd-image-updater.argoproj.io/write-back-method: 'git:secret:argocd/repo-1275005290'

The secret is created using argocd's UI, I have also tried git SSH method but I get the same error Here is the secret data for SSH method:

name: argocd-image-updater
project: default
sshPrivateKey: -----BEGIN OPENSSH PRIVATE KEY-----
SECRET_VALUE
-----END OPENSSH PRIVATE KEY-----
type: git
url: [email protected]:XXX/helm-charts.git

Version v0.12.2

yasharne avatar Oct 23 '23 20:10 yasharne

Getting exact same error on my setup, username and access token works, but github apps does not, Version is same 0.12.2

lado936 avatar Mar 12 '24 14:03 lado936

Support for github app was added in v0.13.0: https://github.com/argoproj-labs/argocd-image-updater/releases/tag/v0.13.0

Sovietaced avatar Jun 03 '24 16:06 Sovietaced