2 years ago

#23717

test-img

Ryan H

Deployer PHP v7 RC3 ssh-keyscan fails and throws Name or service not known

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)

php

git

ssh

centos8

php-deployer

0 Answers

Your Answer

Accepted video resources