github - How to enable minion to connect to git repository using saltstack and capistrano -


i trying create run rails application on ec2 using saltstack , capistrano.

here's have completed far. using salt cloud , salt master able create new minion instance , setup required application run i.e. ruby, rails, unicorn, mysql etc.

i have done proper configuration capistrano. when try deploy see following error.

debug [ed84c6ab] command: ( git_askpass=/bin/echo git_ssh=/pathto/git-ssh.sh /usr/bin/env git ls-remote -h git@github.com:somehost/somerepo.git ) debug [ed84c6ab]    warning: permanently added 'github.com,ip' (rsa) list of known hosts. debug [ed84c6ab]    permission denied (publickey). debug [ed84c6ab]    fatal: not read remote repository. debug [ed84c6ab] debug [ed84c6ab]    please make sure have correct access rights debug [ed84c6ab]    , repository exists. debug [ed84c6ab] finished in 12.600 seconds exit status 128 (failed). 

so means local capistrano able connect minion when tries checkout git repo fails.

i know happening because ssh public key of minion not added github.

so goal is. run salt cloud create instance run salt highstate install required app run capistrano deploy start application

i automate github authorization process too. mean once minion created minion should able clone git repo without manual intervention.

i confused can done through capistrano or saltstack.

i used github ssh forwarding achieve this. here's changes made.

steps enable ssh forwarding github

then in capistrano deploy.rb file configure ssh forwarding adding forward_agent: true

set :ssh_options, {  user: 'user',  auth_methods: %w(publickey),  port: <some port>,  forward_agent: true } 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -