Currently argo-cd does not natively support authenticating with GitHub via GitHub App private keys.
This steps will allow you to achieve this, with AWS SSM as seret storage for a private key:
- Configure
argo-cm
repo credentials to pointpassword
to private key location, andusername
to app id location:
repository.credentials: |
- url: https://github.com/<yourorgnamehere>
passwordSecret:
name: argocd-secret
key: gitHubAppPrivateKeySSMPath # this key contains ssm path to github private key in AWS SSM
usernameSecret:
name: argocd-secret
key: gitHubAppIdSSMPath # this key contains ssm path to app id in AWS SSM
- Create a custom image from
argoproj/argocd
using providedDockerfile
, that will replacegit-ask-pass.sh
with custom implementation from here. Use as this new image as repo server image. - Now every time repo server tries to clone a repo, it will call the new
git-ask-pass.sh
script set viaGIT_ASKPASS
, which will use the private key to grub temporary (10 minutes) jwt token to access them.