0

I'm migrating my project from Deployer v6 to Deployer v7. My server has several projects that utilise passwordless deploy keys, when trying to deploy my project I'm getting the following error despite my SSH config file on the server being correct and originally being able to be deployed on Deployer 6.

I don't think this is a Deployer specific problem but rather some SSH config at blame, what am I missing?

My config file is:

Host fudge-api
Hostname github.com
IdentityFile /root/.ssh/fudge_api_id_ed25519

My deploy.php file:

<?php
namespace Deployer;

require 'recipe/laravel.php';
require 'contrib/npm.php';

// Project repository
set('repository', 'git@github.com:company/fudge-api.git');

// [Optional] Sets the user for the web server.
set('http_user', 'root');

// Shared files/dirs between deploys
add('shared_files', ['.env']);
add('shared_dirs', ['storage', 'vendor', 'node_modules']);

// Set number of releases to keep
set('keep_releases', 3);

// Writable dirs by web server
set('allow_anonymous_stats', false);

// Fudge API (Production)
host('my ipv6 server')
    ->set('labels', ['stage' => 'production'])
    ->set('repository', 'git@fudge-api:company/fudge-api')
    ->set('branch', 'main')
    ->set('remote_user', 'root')
    ->set('deploy_path', '/var/www/fudge-api');

// Composer install
task('deploy:fudge_api_composer_install', function () {
    run('cd {{release_path}} &&
    composer install --optimize-autoloader --no-dev
    ');
});

// run custom task
after('deploy:vendors', 'deploy:fudge_api_composer_install');

// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');

And finally, the exact error:

[IPV6] run ssh-keygen -F fudge-api:22 || ssh-keyscan -p 22 -H fudge-api >> ~/.ssh/known_hosts
[IPV6] err getaddrinfo fudge-api: Name or service not known
[IPV6] err getaddrinfo fudge-api: Name or service not known
[IPV6] err getaddrinfo fudge-api: Name or service not known
[IPV6] exit code 1 (General error)
Kenster
  • 23,465
  • 21
  • 80
  • 106
Ryan H
  • 2,620
  • 4
  • 37
  • 109
  • ssh-keyscan needs the real host name (`github.com`). – torek Jan 07 '22 at 22:55
  • Thus why the `fudge-api` host points to the `github.com` Hostname, but it's not working. – Ryan H Jan 11 '22 at 14:54
  • I don't think ssh-keyscan *reads* the config, i.e., ssh-keyscan *needs* the real host name (as an argument, not as an entry in a file it doesn't read). – torek Jan 12 '22 at 01:05

0 Answers0