lib/capistrano/recipes/deploy/scm/git.rb
# Determines what the response should be for a particular bit of text
# from the SCM. Password prompts, connection requests, passphrases,
# etc. are handled here.
Determines what the response should be for a particular bit of text
from the SCM. Password prompts, connection requests, passphrases,
etc. are handled here.
Determines what the response should be for a particular bit of text from the SCM . Password prompts connection requests passphrases etc . are handled here .
def handle_data(state, stream, text)
          host = state[:channel][:host]
          logger.info "[#{host} :: #{stream}] #{text}"
          case text
          when /\bpassword.*:/i
            unless pass = variable(:scm_password)
              pass = Capistrano::CLI.password_prompt
            end
            "#{pass}\n"
          when %r{\(yes/no\)}
            "yes\n"
          when /passphrase/i
            unless pass = variable(:scm_passphrase)
              pass = Capistrano::CLI.password_prompt
            end
            "#{pass}\n"
          when /accept \(t\)emporarily/
            "t\n"
          end
        end
def handle_data ( state , stream , text ) host = state [ :channel ] [ :host ] logger . info "[#{host} :: #{stream}] #{text}" case text when / \b password.*: /i unless pass = variable ( :scm_password ) pass = Capistrano :: CLI . password_prompt end "#{pass}\n" when %r{ \( yes/no \) } "yes\n" when / passphrase /i unless pass = variable ( :scm_passphrase ) pass = Capistrano :: CLI . password_prompt end "#{pass}\n" when / accept  \( t \) emporarily / "t\n" end end
Determines what the response should be for a particular bit of text
from the SCM.
Determines what the response should be for a particular bit of text from the SCM .
# git is prompting for a password # git is asking whether or not to connect # git is asking for the passphrase for the user's key # git is asking whether to accept the certificate
state
<not_specific>
stream
<not_specific>
text
<not_specific>