It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

bitbucket proxy setting python



Because I want to make every computer which has different proxy setting(or none setting) can run my program, I would like to know how to set proxy in my python program. Or it will produce error: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /rest/api/1.0/projects/xxx/repos/ooo/tags?limit=1000 (Caused by ProtocolError('Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host'))) 

I think this error is caused by proxy because after I set proxy on some computer, it works.

I use Bitbucket Server and atlassian-python-api module.

My program is as following:


from atlassian import Bitbucket


bbucket = Bitbucket(url='', username=username, password=password)

tag = bbucket.get_tags('xxx', 'ooo')



Is there any methods or other ways can help me? Something like: bitbucket.proxies = {'http':proxy_setting, 'https':proxy_setting}? or command setting?


Thanks a lot.

1 answer

1 accepted

0 votes
Answer accepted

Sorry, I found it. Done.

how do you do it?



proxy_setting = http://<username>:<password>@proxy:<portNumber>
bbucket = Bitbucket(url='https://...', username=username, password=password)
bbucket._session.proxies = {'http': proxy_setting, 'https': proxy_setting}

I set it like this and it works. :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,107 views 0 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you