git - 通过 cPanel 添加私有(private) git repo

标签 git github cpanel

我正在尝试将私有(private) git 存储库添加到 cPanel,但遇到了权限问题并且不确定我哪里出错了

我已经在 cPanel 的“SSH 访问”部分生成了 SSH key 。然后,我将 key 添加到 git 中“部署 key ”部分的私有(private)存储库中。

但是当我尝试在 cPanel 上克隆 repo 时,出现错误:

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

我正在尝试使用 SSH git@github.com:myusername/myrepo.git

进行克隆

我做错了什么或错过了一步吗?

最佳答案

克隆 GITHUB 存储库到 CPANEL 步骤

步骤 1. Cpanel -> SSH Access -> Generate New Key(without enter password)->生成 key 后转到公钥下-> manage-> authorize (make authoize) -> back, now view/download-> 复制 key

第 2 步。转到 Github-> https://github.com//-> Settings(repository setting) ->Deploy Keys (右侧)-> add deploy key (give title,and add key)-> done

第 3 步。转到控制面板 -> Git™ 版本控制 -> 克隆 url:git@github.com:/.git

 git@github.com:<user_name>/<repository_name>.git

-> give_repository_path

->给_repository_name

->创建

第 4 步。从列表管理存储库 -> 管理 -> 从 Github pull 或部署 -> 单击从远程更新:完美运行(任何文件编辑或删除你现在从 GitHub 获取/pull )

关于git - 通过 cPanel 添加私有(private) git repo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54365121/

相关文章:

azure - Cpanel -WHM 默认登录

mysql - 如何在 cpanel 中使用亚马逊 rds

xcode - 如何保存断点,使它们成为源代码管理提交项目的一部分

git - 让 Git 消耗更少的磁盘空间?

git - .git/sequencer 目录是什么?

git - 如何保留要压缩到另一个提交的时间?

git - 无法让 TeamCity 使用默认私钥向 GitHub 进行身份验证

python - 如何设置flask github.authorized处理程序收到的 "next"url?

Git 和 Github pull 请求存储提交消息

centos - SASL 认证失败 : Mutt - CPANEL - CentOS