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:
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:
- Generate new key on the server where I'm cloning my project:
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. - Did
eval
and added the key:ssh-add -k ~/.ssh/form_simple_id_rsa
- Tested the connection and all good here.
- Added the
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. - Setup deployer in my project to use my host, port, and the new key I made (because there are a few keys), etc:
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');
- Tried deploying, get an exit code with an error:
Exit Code: 128(Invalid exit argument)
Saying that the ssh -A -tt
command failed.