我们在公共存储库中很高兴地使用了ArgoCD,但是我们在试图将ArgoCD连接到私有存储库时遇到了问题。我们有一个看起来像这样的Application
:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: example-app
namespace: argocd
spec:
destination:
name: example-cluster
namespace: open-cluster-management-agent
project: ops
source:
path: .
repoURL: ssh://git@github.com/example-org/example-repo.git
targetRevision: HEAD
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- Validate=false
- ApplyOutOfSyncOnly=true
与此对应的秘密密钥如下:
apiVersion: v1
metadata:
labels:
argocd.argoproj.io/secret-type: repository
name: example-repo
namespace: argocd
type: Opaque
stringData:
sshPrivateKey: |
-----BEGIN OPENSSH PRIVATE KEY-----
...
-----END OPENSSH PRIVATE KEY-----
url: ssh://git@github.com/example-org/example-repo.git
kind: Secret
ArgoCD无法同步此应用程序,并显示以下错误:
rpc error: code = Unknown desc = error creating SSH agent: "SSH agent
requested but SSH_AUTH_SOCK not-specified"
我明白这告诉了我什么,但我不知道如何在ArgoCD上下文中纠正这个问题。
发布于 2021-09-16 05:56:33
https://stackoverflow.com/questions/69199729
复制相似问题