Получил проблему ниже, я могу получить репозитории, но когда я пытаюсь получить коммит, то это происходит, когда он терпит неудачу, и я получаю 401. Репо и рабочее пространство являются частными, поэтому первый из них потерпит неудачу, я думаю, если бы возникла проблема с кодом целиком. Кто-нибудь делал это недавно?
baseUrlv2 = "https://bitbucket.org/api/2.0"
role = "contributor"
username = {bitbucket_username}
password = {bitbucket_app_password}
r = requests.get("{base}/repositories/{workspace}?role={role}".format(base=baseUrlv2, role=role),
auth=(use
rname, password))
repos = r.json()
while 'next' in repos:
for repo in repos["values"]:
commitLink = repo["links"]["commits"]["href"]
repoSlug = repo["slug"]
#the request below seems to be the issue :\
r = requests.post((commitLink), auth=(username,password))
c = r.json() #this is where it breaks
Подробнее здесь: https://stackoverflow.com/questions/692 ... -cloud-api