We are running SonarQube (v7.5) internally and running Builds through TFS utilizing the Sonar Tasks. The Prepare Analysis step attempts to determine the branch that is being run, as well tries to determine what the Default Branch is for the repository being built. When attempting to determine that default branch, currently the Task gets a ECONNRESET error when attempting to Call the TFS Server from the build server. This looks like it is caused because our proxy does not handle internal traffic like this, and we bypass the proxy… however this task doesn’t seem to be respecting the windows Proxy settings or NO_PROXY environment variables for this call.
here is an example output with the debug from the build task
2019-04-05T14:21:13.8419922Z ##[debug]agent.TempDirectory=C:\agent1\_work\_temp
2019-04-05T14:21:13.8453153Z ##[debug]loading inputs and endpoints
2019-04-05T14:21:13.8458422Z ##[debug]loading ENDPOINT_AUTH_38276943-4881-4ab8-b020-10ad9f6912b8
2019-04-05T14:21:13.8469436Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_38276943-4881-4ab8-b020-10ad9f6912b8_USERNAME
2019-04-05T14:21:13.8472731Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2019-04-05T14:21:13.8475375Z ##[debug]loading ENDPOINT_AUTH_SCHEME_38276943-4881-4ab8-b020-10ad9f6912b8
2019-04-05T14:21:13.8477802Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2019-04-05T14:21:13.8479846Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2019-04-05T14:21:13.8482388Z ##[debug]loading INPUT_CLIPROJECTVERSION
2019-04-05T14:21:13.8484390Z ##[debug]loading INPUT_CLISOURCES
2019-04-05T14:21:13.8486783Z ##[debug]loading INPUT_CONFIGFILE
2019-04-05T14:21:13.8489085Z ##[debug]loading INPUT_CONFIGMODE
2019-04-05T14:21:13.8490826Z ##[debug]loading INPUT_EXTRAPROPERTIES
2019-04-05T14:21:13.8492973Z ##[debug]loading INPUT_PROJECTKEY
2019-04-05T14:21:13.8495241Z ##[debug]loading INPUT_PROJECTNAME
2019-04-05T14:21:13.8498415Z ##[debug]loading INPUT_PROJECTVERSION
2019-04-05T14:21:13.8501199Z ##[debug]loading INPUT_SCANNERMODE
2019-04-05T14:21:13.8503164Z ##[debug]loading INPUT_SONARQUBE
2019-04-05T14:21:13.8507055Z ##[debug]loaded 16
2019-04-05T14:21:13.8520526Z ##[debug]Agent.ProxyUrl=undefined
2019-04-05T14:21:13.8522161Z ##[debug]Agent.CAInfo=undefined
2019-04-05T14:21:13.8522483Z ##[debug]Agent.ClientCert=undefined
2019-04-05T14:21:13.8522745Z ##[debug]Agent.SkipCertValidation=undefined
2019-04-05T14:21:14.3567555Z ##[debug]SonarQube=38276943-4881-4ab8-b020-10ad9f6912b8
2019-04-05T14:21:14.3569212Z ##[debug]38276943-4881-4ab8-b020-10ad9f6912b8=http://<MY SonarQube ServerAddress here>:9000/
2019-04-05T14:21:14.3570718Z ##[debug]38276943-4881-4ab8-b020-10ad9f6912b8 auth param apitoken = null
2019-04-05T14:21:14.3573903Z ##[debug]38276943-4881-4ab8-b020-10ad9f6912b8 auth param username = ********
2019-04-05T14:21:14.3574283Z ##[debug]38276943-4881-4ab8-b020-10ad9f6912b8 auth param password = null
2019-04-05T14:21:14.3574586Z ##[debug]organization=null
2019-04-05T14:21:14.3590625Z ##[debug]scannerMode=MSBuild
2019-04-05T14:21:14.3594858Z ##[debug]projectKey=service-admin
2019-04-05T14:21:14.3597061Z ##[debug]projectName=Admin-Service
2019-04-05T14:21:14.3599356Z ##[debug]projectVersion=1.0
2019-04-05T14:21:14.3599724Z ##[debug]organization=null
2019-04-05T14:21:14.3605011Z ##[debug][SQ] API GET: '/api/server/version' with query "undefined"
2019-04-05T14:21:14.3871797Z ##[debug]Response: 200 Body: "7.5.0.20543"
2019-04-05T14:21:14.3895660Z ##[debug]System.TeamFoundationCollectionUri=https://<myTFSSERVERADDRESSHERE>tfs/DefaultCollection/
2019-04-05T14:21:14.3896142Z ##[debug]System.PullRequest.PullRequestId=undefined
2019-04-05T14:21:14.3896475Z ##[debug]Build.Repository.Provider=TfsGit
2019-04-05T14:21:14.3898861Z ##[debug]Build.SourceBranch=refs/heads/develop
2019-04-05T14:21:14.3919303Z SYSTEMVSSCONNECTION exists true
2019-04-05T14:21:14.3919709Z ##[debug]SYSTEMVSSCONNECTION exists true
2019-04-05T14:22:29.4903935Z ##[warning]Unable to get default branch, defaulting to 'master': Error: read ECONNRESET
2019-04-05T14:22:29.4904394Z ##[debug]Processed: ##vso[task.issue type=warning;]Unable to get default branch, defaulting to 'master': Error: read ECONNRESET
2019-04-05T14:22:29.4905038Z ##[debug]Build.SourceBranch=refs/heads/develop
2019-04-05T14:22:29.4905497Z ##[debug][SQ] Branch and PR parameters: {"sonar.branch.name":"develop"}
2019-04-05T14:22:29.4905922Z ##[debug]extraProperties=# Additional properties that will be passed to the scanner,