iOS IPA Upload Failure - network proxy is interfering

We are using xcrun altool to validate and upload our application ipa to Appstore test flight. The problem is 8 out of 10 times the validation or the upload fails with the below message -

2020-08-19 21:55:34.193 altool[24631:59250] *** Error: Errors uploading '/Users/distiller/release-ipa/MyiOSAPP.ipa': (
"Error Domain=NSCocoaErrorDomain Code=-1011 \"Authentication failed\" UserInfo={NSLocalizedDescription=Authentication failed, NSLocalizedFailureReason=Failed to authenticate for session: (\n    \"Error Domain=ITunesConnectionAuthenticationErrorDomain Code=-26000 \\\"The server returned an invalid response. **This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues**. Please try your request again later.\\\" UserInfo={NSLocalizedRecoverySuggestion=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later., NSLocalizedDescription=The server returned an invalid response. This may indicate that a network proxy is interfering with communication, or that Apple servers are having issues. Please try your request again later., NSLocalizedFailureReason=App Store operation failed.}\"\n)}"

)

There is absolutely no problem with credentials because it works some times.
We are using api key to upload and validate

xcrun altool --upload-app -f ~/release-ipa/MyiOSAPP.ipa -t ios --apiKey XXXXXXXXX --apiIssuer $DEPLOY_ISSUER

xcrun altool --validate-app -f ~/release-ipa/MyiOSAPP.ipa -t ios --apiKey XXXXXXXXX --apiIssuer $DEPLOY_ISSUER

xcode: 11.2.1

Update - 20 Aug ’ 2020
We switched to fastlane to do the upload to the test flight and provided fastlane_user and fastlane_Password as env variables. The lane upload_testflight now just hangs and CircleCI kills the job after the time out period. We increased the time out period to 30 mins and still same result

Has anyone faced this?

We get this issue all the time as well. We just keep trying it until it randomly goes through for whatever reason.

We switched to fastlane and somehow never seen this problem since then.