Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,457,719
Community Members
 
Community Events
176
Community Groups

Can't connect to BitBucket server with both stashy and Bitbucket modules in Python

When I try to connect to my company Bitbucket server, I get errors with both Stashy and Bitbucket modules. I gave proper credentials and url and used ssl_verify false, if I don't use it it gets another error, but as far as I know it should work without SSL.

For what I've seen it seems it doesn't log me in I guess.

 

stashy code :  

 

import stashy


bitbucket = stashy.connect("company_bitbucket_url", "username", "password", verify=False)
projects = bitbucket.projects.list()
repos = bitbucket.repos.list()

for project in projects:
for repo in bitbucket.projects["%s" % (project["key"])].repos.list():
print(repo["name"])
print(repo["project"]['key'])

 

Errors are :

File "/usr/lib/python3.6/http/client.py", line 289, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

 

File "/local/localadmin/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='***', port=443): Max retries exceeded with url: /rest/api/1.0/projects (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response',)))

 

 

Bitbucket module code:

 

from atlassian import Bitbucket


bitbucket = Bitbucket(
url='***',
username='***',
password='***',
verify_ssl=False)
data = bitbucket.project_list()
dataList = list(data)
print(dataList)

 

Errors are: 

 

File "/local/localadmin/.local/lib/python3.6/site-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: URLBlocked for url: https://****/rest/api/1.0/projects.

 

File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events