tomasbjerre / violation-comments-to-bitbucket-cloud-command-line

Report static code analysis to Bitbucket Cloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

command line no longer working due to Bitbucket Cloud recently stopped supporting account passwords

HeidiRechek opened this issue · comments

npx violation-comments-to-bitbucket-cloud-command-line -u 'user' -p 'pass' -ws -rs -prid 5964 -v CHECKSTYLE . '.*/reports/eslint-checkstyle-results.xml$' ESLint -ccwasfc true

INFO Found 1 reports in . with pattern .*(?:/|\)reports(?:/|\)eslint-checkstyle-results.xml$
INFO - C:\gitlocal<repo><folder>.\reports\eslint-checkstyle-results.xml
PR: //5964
FINE

GET /2.0/repositories///pullrequests/5964

SEVERE
<< 401 Unauthorized Bitbucket Cloud recently stopped supporting account passwords for API authentication.
See our community post for more details: https://atlassian.community/t5/x/x/ba-p/1948231
App passwords are recommended for most use cases and can be created in your Personal settings:
https://bitbucket.org/account/settings/app-passwords/
For more details on API authentication methods see our documentation:
https://developer.atlassian.com/cloud/bitbucket/rest/intro/#authentication

javax.ws.rs.NotAuthorizedException: HTTP 401 Unauthorized

We are running this from within Jenkins using credentials, Is there any alternatives to using app passwords?

If we have to use App Passwords, please update the instructions updated to include which permissions are needed.

Did you try app passwords? I dont know what permissions it would need.

I tried App passwords and it works again. I gave my automation users Write on Pull requests and Repositories.
image