在 cPanel 上克隆 Azure 存储库

时间:2021-01-28 20:34:17

标签: git azure azure-devops cpanel

我正在尝试在 cPanel 帐户上克隆 Azure 托管存储库。我已经从 cPanel -> Manage SSH Keys 部分生成了公共和私人 SSH 密钥。

后来我在此 link 之后在我的 Azure 帐户中添加了公钥。当我使用 SSH URL(例如:git@ssh.dev.azure.com/MyProject)在 cPanel 上克隆存储库时,它会抛出以下异常

Error: (XID azuvpp) “/usr/local/cpanel/3rdparty/bin/git” reported error code “128” when it ended:
Permission denied, please try again. Permission denied (password,publickey).
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

注意 - 这里的想法是尝试实施 CI/CD 以在 Azure 存储库中的 master 分支上有提交时自动在 cPanel 上进行推送部署。

乐于接受想法和建议

1 个答案:

答案 0 :(得分:0)

尝试从 cPanel 终端(cPanel >> Home >> Advanced >> Terminal)测试 SSH 访问

ssh -Tv git@ssh.dev.azure.com

特别检查输出中是否提到了您的公钥/私钥文件名(如果您的密钥不是标准的默认 ~/.ssh/id_rsa,则您需要一个 ~/.ssh/config 文件来指定私钥关键文件路径)