I have multiple private git accounts set up with SSH system's keychain authentication for each git repo.
It works to clone private git repos from command line:
git clone git@git_ssh_alias:git-account/some_repo.git
The git_ssh_alias
is the alias name declared in .ssh/config
file that specifies the SSH key that should be used.
However, this same clone doesn't work when running from make file via Drush script as following.
From Make file:
projects[theme_name][type] = "theme"
projects[theme_name][version] = 7.x-1.0
projects[theme_name][download][type] = "git"
projects[theme_name][download][url] = "git@git_ssh_alias:git-account/some_repo.git"
projects[theme_name][download][branch] = "master"
From Drush script:
drush_invoke_process('@self', 'make', array($make_file), $options)
where $make_file
is a path to a make file and options are:
$options = array();
$options['no-core'] = TRUE;
$options['yes'] = TRUE;
$options['contrib-destination'] = 'sites/all';
My question: How to clone private git repo with local ssh keychain authentication enabled?
gitcloneparams
option.git
from command line?ssh-add -l
. If you've multiple keys, use only one.