aws / aws/git-remote-codecommit
git-remote-codecommit fails to recognize the new ~/.aws/config file formats created by AWS CLI v2.9.x
- Vorherrschende Sprache
- Python
- Sterne
- 289
- Forks
- 40
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
# The new AWS CLI v2.9.x creates the following config file:
$ `cat ~/.aws/config`
[profile ]
sso_session =
sso_account_id =
sso_role_name =
region = us-east-2
[sso-session mac]
sso_start_url =
sso_region =
sso_registration_scopes = sso:account:access
# Following git command fails to recognize the above new AWS Config file format:
$ `git clone codecommit::://@`
Cloning into ''...
Traceback (most recent call last):
File "/opt/homebrew/bin/git-remote-codecommit", line 33, in
sys.exit(load_entry_point('git-remote-codecommit==1.16', 'console_scripts', 'git-remote-codecommit')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/git-remote-codecommit/1.16/libexec/lib/python3.11/site-packages/git_remote_codecommit/__init__.py", line 176, in main
context = Context.from_url(remote_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/git-remote-codecommit/1.16/libexec/lib/python3.11/site-packages/git_remote_codecommit/__init__.py", line 148, in from_url
credentials = session.get_credentials()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/git-remote-codecommit/1.16/libexec/lib/python3.11/site-packages/botocore/session.py", line 509, in get_credentials
).load_credentials()
^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/git-remote-codecommit/1.16/libexec/lib/python3.11/site-packages/botocore/credentials.py", line 2095, in load_credentials
creds = provider.load()
^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/git-remote-codecommit/1.16/libexec/lib/python3.11/site-packages/botocore/credentials.py", line 2249, in load
sso_config = self._load_sso_config()
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/git-remote-codecommit/1.16/libexec/lib/python3.11/site-packages/botocore/credentials.py", line 2239, in _load_sso_config
raise InvalidConfigError(
botocore.exceptions.InvalidConfigError: The profile "" is configured to use SSO but is missing required configuration: sso_start_url, sso_region
Beitragsleitfaden
Rechercherichtung
Beginnen Sie in git_remote_codecommit/__init__.py bei Context.from_url und verfolgen Sie dann, wie die Sitzung das im Issue angezeigte Profil lädt und wie botocore dessen sso-session-Abschnitt verarbeitet. Verifizieren Sie, dass das Klonen mit der angezeigten AWS CLI v2.9.x-Konfiguration und dem angezeigten Profil ohne den Fehler sso_start_url oder sso_region erfolgreich ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, git, python
- Bereich
- cli, cloud, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100