aws / aws/git-remote-codecommit

BUG: AWS SSO Login Should Not Be Required for `git remote show origin` Command

オープン
#52 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
289
フォーク
40
PR マージ指標
30日以内にマージされた PR はありません

説明

## Bug Description
In a repository cloned from AWS CodeCommit using the git-remote-codecommit library, the `git remote show origin` command fails with a `TokenRetrievalError` if the AWS SSO CLI session has expired. This is problematic because displaying the remote URL should not require an active AWS SSO session. The AWS SSO login should only be required for commands that perform actions requiring authentication, not for commands that merely retrieve and display repository metadata.

## Steps to Reproduce:
- Log in to AWS SSO using a specific profile:
```sh
$ aws sso login --profile SSO_PROFILE
```
- Clone a CodeCommit repository and navigate into it:
```sh
$ git clone codecommit://SSO_PROFILE@repository && cd repository/
```
- Wait until the AWS SSO CLI session expires.
- Attempt to show the git remote origin url:
```sh
$ git remote show origin
```

## Actual Behavior:
The following error occurs:
```
botocore.exceptions.TokenRetrievalError: Error when retrieving token from sso: Token has expired and refresh failed
```

## Expected Behavior:
The `git remote show origin` command should only display the repository URL and should not require an active AWS SSO session. AWS SSO login should only be necessary for commands that interact with the repository data, not for commands that simply display information.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、git-remote-codecommit ヘルパーが `git remote show origin` と AWS SSO 認証情報の取得をどのように処理しているかを追跡します。SSO セッションの有効期限が切れた後に失敗を再現し、次にリモートメタデータの表示によって認証が発生する箇所を特定します。`git remote show origin` がアクティブな SSO セッションなしでリポジトリ URL を表示し、認証が必要なリポジトリ操作では引き続きログインが必要であれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
cli
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。