ArgoCD github 存储库连接失败,错误:未知 desc = 测试存储库连接时出错:需要身份验证

问题描述 投票:0回答:1

尝试连接 github 存储库,我使用我的凭据拥有 ArgoCD 的管理员访问权限:

argocd repo add https://github.com/myuser/myrepo --username myuser --password mypass

但我不断收到错误:

FATA[0000] rpc error: code = Unknown desc = error testing repository connectivity: authentication required

如果我尝试通过 UI 我会收到错误: enter image description here

如果我检查

argocd-repo-server
,它的错误与:

完全相同
argocd-repo-server level=error msg="finished unary call with code 
Unknown" error="error testing repository connectivity: authentication required" grpc.code=Unknown grpc.method=Test
Repository grpc.service=repository.RepoServerService 
github argocd
1个回答
0
投票

我做了一些调查,并在我的环境中进行了测试,得到了与您相同的错误。

您的问题与您的 GitHub 帐户中启用了 2FA 有关,因此您唯一的选择是使用

personal access tokens
(PAT),这里是官方 GitHub link 如何创建 PAT 令牌。当您拥有 PAT 令牌时运行此命令:

argocd repo add https://github.com/myuser/myrepo --username <YOUR_USERNAME_HERE> --password <YOUR_PAT_TOKEN>
© www.soinside.com 2019 - 2024. All rights reserved.