Satis - specify SSH key to git server -
i have satis.json file specified so:
{ "name": "my organizations satis server", "homepage": "http://satis.mydomain.org", "repositories": [ { "type": "vcs", "url": "git@git.mydomain.org:/home/git/packages/mypackage", "options": { "ssh2": { "username": "git", "pubkey_file": "/config/public-key.pub", "privkey_file": "/config/private-key" } } }, ... i try satis update running command:
/usr/bin/php /path/to/satis/satis -n build /path/to/satis.json /path/to/location this ignore fact have specified public key file , private key file , continue ask me password. if manually plug in password each time works. if move ssh keys .ssh/id_rsa , .ssh/id_rsa.pub , remove options parameters works.
question
how correctly specify key file each repo can use different keys different repositories, rather relying on 1 key in .ssh/id_rsa
as workaround, have managed setting $home/.ssh/config file (nixcraft reference) of hosts in satis.json file so:
host git.mydomain.org hostname git.mydomain.org user git port 22 identityfile /path/to/private-key host git.myseconddomain.org hostname git.myseconddomain.org user git port 22 identityfile /path/to/private-key2 my satis.json file looks like:
{ "name": "my organizations satis server", "homepage": "http://satis.mydomain.org", "repositories": [ { "type": "vcs", "url": "git@git.mydomain.org:/home/git/packages/mypackage" }, { "type": "vcs", "url": "git@git.myseconddomain.org:/home/git/packages/secondpackage" }, ... this rather inelegant , hoping there still way specify path key use in satis.json file.
Comments
Post a Comment