简体   繁体   English

连接 Python 和 bitbucket

[英]Connect Python with bitbucket

Hey im trying to connect python with bitbucket but it keep saying that i need to create an app password although im using my app password, what am i doing wrong?嘿,我正在尝试将 python 与 bitbucket 连接,但它一直说我需要创建应用密码,尽管我正在使用我的应用密码,我做错了什么?

 url = 'https://bitbucket.org/api/2.0/user/'

    headers = {'Content-Type': 'application/json', "Authorization":"Bearer token"}

    r = requests.get(url, auth=('email', 'password'), headers=headers)

    print(r.status_code)

    print(r.text)

You probably need to create an app password, which is different from your regular username/password.您可能需要创建一个应用密码,该密码与您的常规用户名/密码不同。 You can find this in your settings .您可以在您的设置中找到它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM