Giter Site home page Giter Site logo

Comments (4)

christiansiegel avatar christiansiegel commented on July 28, 2024 1

I don't have any experience with Bitbucket cloud, but I found some hints:

  1. According to https://community.atlassian.com/t5/Bitbucket-questions/Using-python-API-to-get-branch-restrictions-pullrequests/qaq-p/2072969 you have to use your username (not your email) + an app password (not your regular password) with enough priviliges. There are also links in the answer on how to create those.
  2. If that does not work, we might have to create the internal Bitbucket client instance differently. Looks like there is a special Cloud class: https://atlassian-python-api.readthedocs.io/index.html
from atlassian.bitbucket import Cloud

bitbucket = Cloud(
    username=bitbucket_email,
    password=bitbucket_password,
    cloud=True)

We're currently using the Bitbucket class:

self.__bitbucket = Bitbucket(git_provider_url, username, password)

Please let us know if hint 1 worked 😉

from gitopscli.

joachimprinzbach avatar joachimprinzbach commented on July 28, 2024

Hey @UrosCvijan
I think the API's are quite similar, you could try to set the URL to the cloud instance and try it out - we have not tested it yet.

from gitopscli.

UrosCvijan avatar UrosCvijan commented on July 28, 2024

Hi @christiansiegel ,

I will try. I think i even tried all the combinations but constantly was getting like permission denied error, if i have access or check if the repository exist. It was something like that.
I think there is some difference what is organization in bitbucket server, cloud etc..
I mean, you dont have to change it for this use case, it would be nice. I will also try to push that we move to github as noticed for a lot of things bitbucket cloud does not have support or those other things dont have support for bitbucket cloud.

Thank you for the great tool btw.. .

from gitopscli.

christiansiegel avatar christiansiegel commented on July 28, 2024

Hi @UrosCvijan ,

I played around with it: With the Bitbucket Cloud client of atlassian-python-api I could get it to work. So what needs to be done is

  1. Upgrade
    "atlassian-python-api==1.14.5",
    to a more recent version with cloud support
  2. Implement the GitRepoApi interface for Bitbucket cloud using the aforementioned Cloud client

I started on branch feat/bitbucket-cloud. I marked all the remaining TODOs. Unfortunately I don't have much time these days. Anyone, feel free to take it from here..

from gitopscli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.