From 559eae2224a7790584bbbac99c84e523d28888fd Mon Sep 17 00:00:00 2001 From: Hari Sekhon Date: Sat, 17 Oct 2020 12:46:52 +0100 Subject: [PATCH] updated curl_auth.sh --- curl_auth.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/curl_auth.sh b/curl_auth.sh index 7a5a54a8..1566428c 100755 --- a/curl_auth.sh +++ b/curl_auth.sh @@ -50,7 +50,10 @@ done check_bin curl USERNAME="${USERNAME:-${USER:-$(whoami)}}" -TOKEN="${TOKEN:-${OAUTH2_TOKEN:-${OAUTH_TOKEN:-${JWT_TOKEN:-}}}}" +# for APIs like Codeship codeship_api_token.sh in which you must use basic auth and not pass a token +if [ -z "${NO_TOKEN_AUTH:-}" ]; then + TOKEN="${TOKEN:-${OAUTH2_TOKEN:-${OAUTH_TOKEN:-${JWT_TOKEN:-}}}}" +fi # Only do password mechanism and netrc_contents workaround if not using Kerberos if [ -z "${KRB5:-${KERBEROS:-}}" ]; then