I'm trying to git clone a remote repository by using a simple bash script, but I could not get pass the prompt where github asks for my username and password. Here is my condensed version of the script:
#!/bin/bash
REPO=$1
USERNAME=$2
PASSWORD=$3
git clone $REPO
expect "Username for 'https://github.com':"
send $USERNAME
The send command does not seem like it is passing the USERNAME variable because the prompt never get pass the "Username for 'https://github.com':"
I tried piping and heredoc methods without any luck. Any help is gladly appreciated.
Thanks!