def connectBitBucket(self, args): bitbucket_url = "https://bitbucket.microchip.com/" try: gitAccess = Bitbucket( url=bitbucket_url, username=args.bitbucket_user_id, password=args.bitbucket_personal_access_token) gitAccess.get_users() return gitAccess except Exception as e: if (args.debug_mode): print("[Debug] " + str(e)) raise Exception( "[!] Invlaid bitbucket login information or do not have permission to access this repo" )
# coding=utf-8 from atlassian import Bitbucket bitbucket = Bitbucket(url='http://localhost:7990', username='******', password='******') data = bitbucket.get_users(user_filter="username") print(data)