## TL;DR

For "could not read Username for 'https://gitlab.com'": per maintainer blakepettersson, who hit the exact same bug with a customer, the credential error appears when a repository's location changed (or the cached repo entry went stale across the 2.12 upgrade) and Argo CD keeps trying the old credentials against the new URL.

```text
could not read Username for 'https://gitlab.com'
```

## Steps

1. What was reported:
Issue argoproj/argo-cd#19585 (closed, 48 comments): Since Argo CD 2.12.x, apps synced from GitLab fail with "could not read Username for 'https://gitlab.com'" from the UI. The repo credentials are configured and worked before the upgrade.

2. What works:
Maintainer-verified fix: resync the affected applications. Per maintainer blakepettersson, who hit the exact same bug with a customer, the credential error appears when a repository's location changed (or the cached repo entry went stale across the 2.12 upgrade) and Argo CD keeps trying the old credentials against the new URL. Open each affected app and trigger a refresh/resync so it re-reads the current repo configuration, and the username error clears. If you recently moved a repo, resync is the first thing to try before rotating credentials.

## When to use

You are seeing this: What was reported: Issue argoproj/argo-cd#19585 (closed, 48 comments): Since Argo CD 2.12.x, apps synced from GitLab fail with "could not read Username for 'https://gitlab.com'" from the UI. Use this skill when you run into "could not read Username for gitlab.com after 2.12 upgrade: resync the apps".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Sources

- https://gitlab.com'"
