File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -43,13 +43,25 @@ if [[ -z "$url" || -z "$user" ]]; then
4343 usage
4444fi
4545
46+ if [[ -n " $DIGMA_PASSWORD " ]]; then
47+ echo " Using password from DIGMA_PASSWORD environment variable"
48+ pwd=" $DIGMA_PASSWORD "
49+ fi
50+
4651# Prompt for password if not provided
4752if [[ -z " $pwd " ]]; then
4853 echo -n " Enter password for user '$user ': "
4954 read -s pwd
5055 echo " "
5156fi
5257
58+ if [[ -z " $pwd " ]]; then
59+ echo " Password is required but not provided. Please run the script with --pwd option or set DIGMA_PASSWORD environment variable." >&2
60+ echo " Example: DIGMA_PASSWORD=mypassword curl -s https://raw.githubusercontent.com/digma-ai/digma/main/dev/troubleshooting/login_test.sh | bash -s -- --url <URL> --user <USER> --token <TOKEN>" >&2
61+ exit 1
62+ fi
63+
64+
5365echo -n " login to $url /Authentication/login"
5466echo " "
5567response=$( curl -s -w " HTTPSTATUS:%{http_code}" -X ' POST' \
You can’t perform that action at this time.
0 commit comments