microsoft / microsoft/azure-devops-python-api
AzureDevOpsAuthenticationError: The requested resource requires user authentication: https://dev.azure.com/myorg/_apis
オープン
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 684
- フォーク
- 218
- 平均マージ
- 8日 10時間
- マージ済み PR(30日)
- 1
説明
I followed the sample code:
credentials = BasicAuthentication(username=user, password=pat)
self.connection = Connection(base_url="https://dev.azure.com/myorg/", creds=credentials)
testClient = self.connection.clients.get_core_client()
But I get exception. Did I miss something?
testClient = self.connection.clients.get_core_client()
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/released/client_factory.py", line 44, in get_core_client
return self._connection.get_client('azure.devops.released.core.core_client.CoreClient')
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/connection.py", line 45, in get_client
self._client_cache[client_type] = self._get_client_instance(client_class)
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/connection.py", line 58, in _get_client_instance
url = self._get_url_for_client_instance(client_class)
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/connection.py", line 70, in _get_url_for_client_instance
resource_areas = self._get_resource_areas()
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/connection.py", line 120, in _get_resource_areas
self._resource_areas = location_client.get_resource_areas()
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/v5_1/location/location_client.py", line 104, in get_resource_areas
response = self._send(http_method='GET',
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/client.py", line 74, in _send
request = self._create_request_message(http_method=http_method,
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/client.py", line 119, in _create_request_message
location = self._get_organization_resource_location(location_id)
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/client.py", line 160, in _get_organization_resource_location
return self._get_resource_location(self.normalized_url, location_id)
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/client.py", line 172, in _get_resource_location
Client._locations_cache[url] = self._get_resource_locations(url, all_host_types=False)
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/client.py", line 208, in _get_resource_locations
response = self._send_request(request, headers=headers)
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/client.py", line 68, in _send_request
self._handle_error(request, response)
File "/Users/runner/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/azure/devops/client.py", line 290, in _handle_error
raise AzureDevOpsAuthenticationError(full_message_format.format(error_message=error_message,
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Connection(...) と BasicAuthentication のサンプルから始め、次に azure/devops/connection.py と azure/devops/client.py 内の get_core_client をたどって、スタックトレースに示されている resource-area リクエストまで追跡します。認証失敗を再現し、不足している設定またはエンドポイントの詳細を特定します。サンプルが正常に認証できるようになるか、必要な修正が文書化されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- azure, python
- 領域
- api, authentication
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100