# Sonarcloud fails to authorize

**URL:** https://travis-ci.community/t/sonarcloud-fails-to-authorize/5845
**Category:** Travis CI Discussions & Feedback
**Created:** [November 8, 2019, 11:17am UTC](https://travis-ci.community/t/sonarcloud-fails-to-authorize/5845 "2019-11-08T11:17:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![svilenvelikov](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/svilenvelikov/32/3088_2.png) [@svilenvelikov](https://travis-ci.community/u/svilenvelikov)
#### Post date: [November 8, 2019, 11:17am UTC](https://travis-ci.community/t/sonarcloud-fails-to-authorize/5845/1 "2019-11-08T11:17:45Z")

</div>

During the build is executed analysys of the code through the sonarcloud. Suddenly sonar step started to fail with

```auto
ERROR: Error during SonarQube Scanner execution
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.

```

[example failing build](https://travis-ci.com/Ontotext-AD/graphdb-workbench/jobs/254392642)  
Tried to renew the sonar token with no luck. Any ideas on what might be the reason for this behavior?

---

<div class="post-metadata">

### Author: ![beatngu13](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/beatngu13/32/3086_2.png) [@beatngu13](https://travis-ci.community/u/beatngu13)
#### Post date: [November 8, 2019, 11:41am UTC](https://travis-ci.community/t/sonarcloud-fails-to-authorize/5845/2 "2019-11-08T11:41:42Z")

</div>

I can confirm that, multiple projects suddenly started failing:

- [https://travis-ci.com/retest/recheck/jobs/254415589#L4168](https://travis-ci.com/retest/recheck/jobs/254415589#L4168)
- [https://travis-ci.com/retest/recheck-web/builds/135617388#L3165](https://travis-ci.com/retest/recheck-web/builds/135617388#L3165)
- [https://travis-ci.com/retest/recheck.cli/builds/135612367#L710](https://travis-ci.com/retest/recheck.cli/builds/135612367#L710)

---

<div class="post-metadata">

### Author: ![berickus](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/berickus/32/3091_2.png) [@berickus](https://travis-ci.community/u/berickus)
#### Post date: [November 8, 2019, 11:57am UTC](https://travis-ci.community/t/sonarcloud-fails-to-authorize/5845/3 "2019-11-08T11:57:07Z")

</div>

We have the same issue.  
My thread for this:  
[https://travis-ci.community/t/sonar-scanner-is-not-working-anymore/5848/2](https://travis-ci.community/t/sonar-scanner-is-not-working-anymore/5848/2)

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [November 8, 2019, 4:42pm UTC](https://travis-ci.community/t/sonarcloud-fails-to-authorize/5845/4 "2019-11-08T16:42:46Z")

</div>

There is a problem here: [https://github.com/Ontotext-AD/graphdb-workbench/blob/3b88c8afbb211cffb4da687bad41f1c7c1c92e69/.travis.yml#L21](https://github.com/Ontotext-AD/graphdb-workbench/blob/3b88c8afbb211cffb4da687bad41f1c7c1c92e69/.travis.yml#L21)

Which is a different manifestation of

> [@Deploy fails with Aws::S3::Errors::SignatureDoesNotMatch](https://travis-ci.community/t/deploy-fails-with-aws-signaturedoesnotmatch/5835):
>
> [https://travis-ci.org/seiu503/member-app-2019/builds/609016742](https://travis-ci.org/seiu503/member-app-2019/builds/609016742) (error at line 1984) my last few builds have failed with this message: /home/travis/.rvm/gems/ruby-2.4.5/gems/aws-sdk-core-2.11.393/lib/seahorse/client/plugins/raise\_response\_errors.rb:15:in call’: The request signature we calculated does not match the signature you provided. Check your key and signing method. (Aws::S3::Errors::SignatureDoesNotMatch)` i didn’t make any changes to these keys and they have been working fine for mont…

which is explained in

> **[More secure handling of \`secure\` values in configuration - Travis CI changelog](https://headwayapp.co/travis-ci-changelog/more-secure-handling-of-secure-values-in-configuration-126390)**
>
>  Improvement  
> We improved our handling of secure values in the user configurations in order to prevent accidental...

So, in short: Check your `secure` values!

---

<div class="post-metadata">

### Author: ![svilenvelikov](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/svilenvelikov/32/3088_2.png) [@svilenvelikov](https://travis-ci.community/u/svilenvelikov)
#### Post date: [November 11, 2019, 4:30pm UTC](https://travis-ci.community/t/sonarcloud-fails-to-authorize/5845/5 "2019-11-11T16:30:16Z")

</div>

All is good but I still can’t get it running. Following [this guide](https://docs.travis-ci.com/user/sonarcloud/)  
I got the sonar token and encrypted it through [this resource](http://rkh.github.io/travis-encrypt/public/index.html) which I found in the [apps listing](https://docs.travis-ci.com/user/apps/). I didn’t use the travis CLI as I can’t get it running as well. Encrypted token I put in the .travis.yml

```auto
addons:
  sonarcloud:
    organization: "ontotext-ad"
    token:
      secure: "encrypted token here"

```

After this I still have the build failing due to the same `ERROR: Not authorized.` error.  
Any Ideas on how can I proceed? Also is this site which I’m using for the encryption still relevant for the job or it’s outdated?
