Sha256: fdbe506cf4e7c9492b09911ab501629a2d1460866cd4977d4ca3d0bb241de149
Contents?: true
Size: 1.07 KB
Versions: 17
Compression:
Stored size: 1.07 KB
Contents
#!/usr/bin/expect -f # # Expect script to supply username/password to cap deploy to git private repository # # This script needs username and password as arguments to connect to git server: # ------------------------------------------------------------------------ # ./git_cap gitusr gitpwd # ------------------------------------------------------------------------- # # set Variables # set g_user [lrange $argv 0 0] set g_pwd [lrange $argv 1 1] # # Regular Expressions ... http://docs.activestate.com/activetcl/8.5/expect4win/regex.html # set ulook ".?sername for 'https:\/\/github\.com':.*" set plook ".?assword for .*@github\.com':.*" # # set TimeOut # set timeout -1 # # start deployment .. expects git_user + git_password 2 times ! # spawn cap deploy match_max 100000 # Look for user prompt expect -re $ulook send -- "$g_user\r" send -- "\r" # Look for passwod prompt expect -re $plook send -- "$g_pwd\r" send -- "\r" # Look for user prompt expect -re $ulook send -- "$g_user\r" send -- "\r" # Look for passwod prompt expect -re $plook send -- "$g_pwd\r" send -- "\r" expect eof
Version data entries
17 entries across 17 versions & 1 rubygems