hezyin opened a new issue, #4138: URL: https://github.com/apache/incubator-devlake/issues/4138
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues. ### What happened A user reported in the Slack that on v0.14.2, when invoking Bitbucket plugin (beta) through API following steps in [doc](https://devlake.apache.org/docs/next/Plugins/bitbucket), the git extractor task would fail to clone repos whose owners aren't the user himself. Upon examination of our source code, it seems we incorrectly passed `Op.Owner` for authentication instead of using the username from the Bitbucket connection. This is tricky because when `Op.Owner` and the connection's username are the same people, then this logic would work and thus hide the issue. <img width="1213" alt="Screen Shot 2023-01-06 at 11 04 51 AM" src="https://user-images.githubusercontent.com/2908155/211081702-bc826129-6a04-4eb6-b1b0-d693a8ac14e6.png"> ### What do you expect to happen I expect a user A can successfully clone a user B's Bitbucket private repos as long as user A has access to those repos. ### How to reproduce Please see above. ### Anything else This bug needs to be fixed on main and the fix needs to be cherry-picked back to v0.14.x. ### Version main ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
