I have a bash script in which I am cloning a total of 5 repositories from a private server. I don't want the user to enter his credentials again and again, hence I prompt for them once and then reuse them.
This is my code for credentials promt
read -p "Enter Username: " username
echo -n "Enter Password: "
read -s password
However when this piece of code is run via maven, it does not display the prompt messages such as Enter Username
and does not even accept the -s silent input
flag.
If run without maven, this script runs fine.
The catch is that if I use the read
command without any flags or string prompts, it runs fine, which makes me think that maven might not be either recognizing or accepting these flags.
Has anyone else come across this?
I have tried using the interactive
mode in maven as well, same results.