aws / aws/git-remote-codecommit
BUG: AWS SSO Login Should Not Be Required for `git remote show origin` Command
- Lenguaje dominante
- Python
- Estrellas
- 289
- Forks
- 40
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
## 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.
Guía de contribución
Línea de trabajo
Comienza rastreando cómo el helper git-remote-codecommit gestiona `git remote show origin` y la obtención de credenciales de AWS SSO. Reproduce el fallo después de que expire la sesión de SSO y, a continuación, identifica dónde la visualización de metadatos del remoto activa la autenticación. Se considera terminado cuando `git remote show origin` muestra la URL del repositorio sin una sesión de SSO activa, mientras que las operaciones autenticadas del repositorio siguen requiriendo iniciar sesión.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- cli
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100