Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitbucket Cloud recently stopped supporting account passwords for API authentication #235

Open
binakot opened this issue Mar 21, 2022 · 1 comment

Comments

@binakot
Copy link

binakot commented Mar 21, 2022

Good day.
Can this plugin works after cancelling password authentication?
I cannot configure plugin to works right now 😢

I tried to use App Password and OAuth token, but it doesn't help.
Every time I got 401 Unauthorized error and logs below:

WARNING: 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
bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.bitbucket.server.ServerApiClient getAllValues
            WARNING: invalid response.
            java.lang.NullPointerException
            at java.base/java.io.StringReader.<init>(StringReader.java:50)
            at org.codehaus.jackson.JsonFactory.createJsonParser(JsonFactory.java:636)
            at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1877)
            at bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.bitbucket.ApiClient.parse(ApiClient.java:210)
            at bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.bitbucket.server.ServerApiClient.getAllValues(ServerApiClient.java:122)
            at bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.bitbucket.server.ServerApiClient.getPullRequests(ServerApiClient.java:37)
            at bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.BitbucketRepository.getTargetPullRequests(BitbucketRepository.java:116)
            at bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.BitbucketPullRequestsBuilder.run(BitbucketPullRequestsBuilder.java:37)
            at bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.BitbucketBuildTrigger$TriggerRunnable.run(BitbucketBuildTrigger.java:414)
            at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
            at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:829)
@CodeMonk
Copy link
Collaborator

I believe the plugin needs actual usernames and passwords, not the api token or oauth. Feel free to extend the code if you need it!

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

No branches or pull requests

2 participants