question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bitbucket Cloud not working

See original GitHub issue

This code is not working. Seems like Cloud works and Bitbucket doesn’t.

oauth2 = {
    'client_id': os.getenv('client-id'),
    'token': {
        'token_type': 'Bearer',
        'access_token': os.getenv('access-token')
    },
}

cloud = Cloud(
    url="https://api.bitbucket.org/",
    oauth2=oauth2,
    cloud=True,
    # advanced_mode=True
)

res = cloud.get("repositories/test")

bitbucket = Bitbucket(
    url="https://api.bitbucket.org/",
    oauth2=oauth2,
    cloud=True,
)

p = list(bitbucket.project_list())

The error i get is:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/.cache/pypoetry/virtualenvs/autogit-qXb98hrH-py3.10/lib/python3.10/site-packages/atlassian/bitbucket/base.py", line 59, in _get_paged
    response = self.get(url, trailing=trailing, params=params, data=data, flags=flags, absolute=absolute)
  File "/home/user/.cache/pypoetry/virtualenvs/autogit-qXb98hrH-py3.10/lib/python3.10/site-packages/atlassian/rest_client.py", line 273, in get
    "GET",
  File "/home/user/.cache/pypoetry/virtualenvs/autogit-qXb98hrH-py3.10/lib/python3.10/site-packages/atlassian/rest_client.py", line 245, in request
    return response
  File "/home/user/.cache/pypoetry/virtualenvs/autogit-qXb98hrH-py3.10/lib/python3.10/site-packages/atlassian/rest_client.py", line 407, in raise_for_status
    else:
requests.exceptions.HTTPError

I made a print so that the url that is called gets printed and i got this: url => https://api.bitbucket.org/2.0/projects

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
hyunlee1ocommented, Nov 7, 2022

Thank you a lot @Spacetown. I had problems getting started with the documentation. I think a more curated documentation would have helped me not getting stuck on this case. Have a nice day 😃

1reaction
Spacetowncommented, Nov 7, 2022

For the OO interface you can also check the tests (tests/test_bitbucket_cloud_oo.py) for examples.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot SSH issues | Bitbucket Cloud - Atlassian Support
If you're having problems with SSH, here are some things you can try when troubleshooting your issues. If you're using Sourcetree, some of...
Read more >
Could not Connect to Bitbucket Cloud Integration - Snyk Support
While Integrating Snyk with Bitbucket cloud account please make sure your username is the same as what appears here https://bitbucket.org/account.
Read more >
Bitbucket down? Current problems and outages - Downdetector
Real-time problems and outages for Bitbucket. Can't log in? Don't have access to your git? Here you see what is going on.
Read more >
Bitbucket Overview
Cloud Server Data center Git repository hosting Cloud Server Data center Branch permissions Cloud Server Data center Jira Software integration Cloud Server Data center
Read more >
How can I solve this invalid credentials problem on Bitbucket?
I solved the problem by following the below steps · Open App Passwords page of personal settings on the Bitbucket · Click on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found