通过cPanel添加私人git回购 [英] Adding private git repo via cPanel

查看:99
本文介绍了通过cPanel添加私人git回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在cPanel上添加一个私人git repo,但是遇到权限问题,不确定我要去哪里哪里

I'm trying to add a private git repo onto cPanel but have ran into permission issues and not sure where I'm going wrong

我已经在cPanel的"SSH访问"部分生成了SSH密钥.然后,我在部署密钥"部分的git中将密钥添加到私有仓库中.

I have generated the SSH keys in cPanel at the 'SSH Access' section. I then added the key onto the private repo in git at the 'Deploy keys' section.

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

But when I try to clone the repo on cPanel I get the error:

错误:"/usr/local/cpanel/3rdparty/bin/git"报告错误代码"128"结束时间:权限被拒绝(公钥).致命:无法阅读从远程存储库.请确保您具有正确的访问权限权限并且存储库存在.

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

I'm trying to clone with SSH git@github.com:myusername/myrepo.git

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

Have I done something wrong or missed a step?

推荐答案

克隆GITHUB存放到CPANEL步骤

CLONE GITHUB REPOSITORY TO CPANEL STEPS

步骤1. Cpanel->SSH访问->生成新密钥(不输入密码)->生成密钥后转到公共密钥下->管理->授权(进行身份验证)->返回,现在查看/下载->复制键

steps 1. Cpanel -> SSH Access -> Generate New Key(without enter pasword)->after generated key go to under public key-> manage-> authorize (make authoize) -> back, now view/download-> copy key

第2步.转到Github->. https://github.com//-->设置(存储库设置)->部署密钥(右侧)->添加部署密钥(给标题,并添加密钥)->完成

Step 2. Go Github-> https://github.com// -> Settings(repository setting) ->Deploy Keys (rights side)-> add deploy key (give title,and add key)-> done

第3步.转到Cpanel->Git™版本控制->克隆网址:git@github.com:/< private_repository_name> .git

Step 3. Go to Cpanel -> Git™ Version Control -> clone url : git@github.com:/<private_repository_name>.git

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

->Give_repository_path

-> give_repository_path

->Give_仓库名称

-> give_ repository_name

->创建

第4步.从列表管理存储库->管理->从Github中拉出或展开->单击从远程更新":效果很好(任何文件都可以编辑或删除,现在就可以从GitHub提取/拉取您的文件)

Step 4. manage repository from list-> Manage -> pull or deploy from Github -> Click on Update from Remote: works perfectly(any files edit or delete you fetch/pull from GitHub now)

这篇关于通过cPanel添加私人git回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆