【问题标题】:Clone Azure Repository on cPanel在 cPanel 上克隆 Azure 存储库
【发布时间】:2021-02-04 03:00:03
【问题描述】:

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

后来我在我的 Azure 帐户中添加了这个 link 之后的公钥。当我使用 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 存储库中的主分支上有提交时自动在 cPanel 上进行推送部署。

接受想法和建议

【问题讨论】:

    标签: git azure azure-devops cpanel


    【解决方案1】:

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

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

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

    【讨论】:

    • 是否将 Azure repo 连接到 cPanel 以及对 azure repo 的任何推送是否会自动更新 cPanel 代码库中的代码?
    • @Slimshadddyyy 否:您的问题提到在您的 Azure 帐户中添加公钥:这意味着您正在尝试连接到 Azure。不是 cPanel。
    • 我正在尝试将 Azure Repo 连接到 cPanel Git
    • @Slimshadddyyy 这将“连接”它们,但要澄清 SSH 查询:您的问题是:“当我使用 SSH URL 时(例如:git@ssh.dev.azure.com/MyProject)在 cPanel 上克隆存储库”。这意味着 cPanel 正在使用 Azure SSH URL 访问 Azure 存储库,以便将所述存储库克隆到 cPanel:SSH 是从 cPanel 到 Azure,这就是您在 Azure 端重新注册公钥的原因。
    • @Slimshadddyyy 当您执行git pull时,任何对 azure 的推动都会反映在 cPanel 上
    猜你喜欢
    • 1970-01-01
    • 2019-12-26
    • 1970-01-01
    • 2020-04-03
    • 1970-01-01
    • 2021-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多