[英]Git can't clone project via ssh Deployer
I'm using Deployer to clone a project onto a server, but despite setting up the deploy key, for some reason cloning via SSH is failing:我正在使用 Deployer 将项目克隆到服务器上,但尽管设置了部署密钥,但由于某种原因,通过 SSH 克隆失败:
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Steps I've taken:我采取的步骤:
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
, my key file is in this forat: form_simple_id_rsa
and of course the pub version too.ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
,我的密钥文件在这个格式中: form_simple_id_rsa
,当然还有 pub 版本。eval
and added the key: ssh-add -k ~/.ssh/form_simple_id_rsa
eval
并添加了密钥: ssh-add -k ~/.ssh/form_simple_id_rsa
form_simple_id_rsa.pub
key to my repository as a deploy key, the repo owner isn't my account, I'm a collab on this repo, but the server's key is linked to the project so it should be able to clone.form_simple_id_rsa.pub
密钥添加到我的存储库作为部署密钥,存储库所有者不是我的帐户,我是此存储库的协作者,但服务器的密钥已链接到项目,因此它应该能够克隆。host('project')
->port(myport)
->identityFile('~/.ssh/form_simple_id_rsa')
->stage('production')
->set('repository', 'git@github.com:company/project.git')
->user('root')
->set('deploy_path', '/var/www/path');
Exit Code: 128(Invalid exit argument)
Saying that the ssh -A -tt
command failed.说
ssh -A -tt
命令失败。
If this is not a DEployer version issue ( as in here ), I would try:如果这不是 DEployer 版本问题(如此处),我会尝试:
ssh-add step
, making sure there is no passphrase required)ssh-add step
,确保不需要密码)-m PEM
, to use the old PEM format instead of the new OPENSSH one, in case it has any effect-m PEM
生成密钥,以使用旧的 PEM 格式而不是新的 OPENSSH 格式,以防它有任何影响
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.