aws / aws/git-remote-codecommit
BUG: AWS SSO Login Should Not Be Required for `git remote show origin` Command
- Vorherrschende Sprache
- Python
- Sterne
- 289
- Forks
- 40
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## 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.
Beitragsleitfaden
Rechercherichtung
Beginne damit nachzuverfolgen, wie der Helfer git-remote-codecommit `git remote show origin` und den Abruf von AWS SSO-Anmeldedaten verarbeitet. Reproduziere den Fehler, nachdem die SSO-Sitzung abgelaufen ist, und ermittle anschließend, wo die Anzeige von Remote-Metadaten eine Authentifizierung auslöst. Fertig ist die Arbeit, wenn `git remote show origin` die Repository-URL ohne aktive SSO-Sitzung anzeigt, während authentifizierte Repository-Operationen weiterhin eine Anmeldung erfordern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- cli
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100