argocd-operator
argocd-operator copied to clipboard
fix: add missing github.com host keys
What type of PR is this?
/kind enhancement
What does this PR do / why we need it:
Adds the missing Github.com keys added after https://github.blog/2021-09-01-improving-git-protocol-security-github/. Those keys are required to connect to Github.com, otherwise it raises the following error: error testing repository connectivity: ssh: handshake failed: knownhosts: key mismatch
time="2022-07-14T19:00:17Z" level=info msg="Alloc=9943 TotalAlloc=29697 Sys=28753 NumGC=10 Goroutines=15"
The default known_hosts
list was already updated in ArgoCD with https://github.com/argoproj/argo-cd/pull/7722
Have you updated the necessary documentation?
N/A
Which issue(s) this PR fixes:
N/A
How to test changes / Special notes to the reviewer:
cc @jomkz @iam-veeramalla
@raelga Thanks for the PR :). Do you think we should remove the existing RSA key for github.com in the defaults.go ?
@raelga Thanks for the PR :). Do you think we should remove the existing RSA key for github.com in the defaults.go ?
@raelga what do you think ?
Hey @iam-veeramalla,
Let me check the GitHub.com documentation to review with keys can be removed safely and update th PR.
It seems that RSA is still in use:
> ssh-keyscan github.com
# github.com:22 SSH-2.0-babeld-408889af
github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
# github.com:22 SSH-2.0-babeld-408889af
# github.com:22 SSH-2.0-babeld-408889af
# github.com:22 SSH-2.0-babeld-408889af
github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
# github.com:22 SSH-2.0-babeld-408889af
github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=
Is there any workaround this issue until this gets merged (except manually adjusting argocd-ssh-known-hosts-cm
CM with)?
If is still in use, we can just merge this PR.