Skip to content
This repository has been archived by the owner on Feb 8, 2021. It is now read-only.

Authentication error #16

Open
brunoeustaquio opened this issue Jun 22, 2017 · 4 comments
Open

Authentication error #16

brunoeustaquio opened this issue Jun 22, 2017 · 4 comments

Comments

@brunoeustaquio
Copy link

Hi,

I´m receiving a 401 error:

Error: Interaction with plugin with id 'sonar.quality.gate.plugin' implementing 'task' extension failed while requesting for 'execute'. Reason: [The plugin sent a response that could not be understood by Go. Plugin returned with code '500' and the following response: '{"exception":{"detailMessage":"Failed : HTTP error code : 401","stackTrace":[],"suppressedExceptions":[]},"success":false,"message":"Failed to get quality gate for project. Please check if a quality gate is defined"}'

How do I pass Sonar credentials?
Thanks

@bradeac
Copy link
Collaborator

bradeac commented Jun 23, 2017

Hi,

You have to set environment variables with the following names:

  • GO_BUILD_USER
  • GO_BUILD_USER_PASSWORD

Although I suspect that the problem isn't the authentication. Please come back with a reply if this solved your issue or not.

Have a nice day.

@brunoeustaquio
Copy link
Author

Hi,
I have set the environment variables but you´re right. It is not authentication.
The message is the same:

[SonarQube Quality Gate Plugin] Error during get or parse of quality gate result. Please check if a quality gate is definedFailed : HTTP error code : 401
Error: Interaction with plugin with id 'sonar.quality.gate.plugin' implementing 'task' extension failed while requesting for 'execute'. Reason: [The plugin sent a response that could not be understood by Go. Plugin returned with code '500' and the following response: '{"exception":{"detailMessage":"Failed : HTTP error code : 401","stackTrace":[],"suppressedExceptions":[]},"success":false,"message":"Failed to get quality gate for SQT-poc-ci. Please check if a quality gate is defined"}']
[go] Task status: failed

Do you have any other hint on this?
Another question: the plugin log exposes all the environment variable values, even the secure variables values. Is there a way to prevent this to happen?

Thank you!

@bradeac
Copy link
Collaborator

bradeac commented Jun 26, 2017

Hi,

Regarding the environmental variables, the secure ones are hidden like this:
16:40:17.782 [go] setting environment variable 'GO_BUILD_USER' to value 'bradeac'
16:40:17.782 [go] setting environment variable 'GO_BUILD_USER_PASSWORD' to value '********'

About the plugin: are you sure your server is up and running and configured properly ? Also, are you sure that the plugin is properly configured ?
While I cannot help you too much regarding the configuration of the server, I can assure you that the plugin works well with our sonar server, that's why I'm guessing that something might be wrong with the server. Can you show what data did you introduced into the plugin fields ?

Have a nice day.

@droberin
Copy link
Contributor

Just a thing, @brunoeustaquio , did you update this plugin? It was updated not long time ago due to some auth issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants