Created
June 4, 2018 21:13
-
-
Save mdelillo/2883473eda55ebee3f9b29d6a9bcb722 to your computer and use it in GitHub Desktop.
Use your browser to automatically log in to fly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login-fly () | |
{ | |
expect <(cat <<EOF | |
spawn fly -t credhub login | |
expect "1: GitHub" | |
send -- "1\r" | |
expect -re "https://.*fly_local_port=\[0-9\]*" | |
set url [ string map { "\&" "\\\&" } \$expect_out(0,string) ] | |
system open \$url | |
expect eof | |
EOF | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment