**Confirm the failure point.** Run doctl auth init and note that it fails at validation, before any resource command runs. Expected: the invalid credential error above, which means no working context was saved.

**Create a fresh credential in the control panel.** In the DigitalOcean control panel, open the API section and generate a new personal access credential with read and write scopes, and copy it immediately; the full value is shown only once. Success check: you hold the complete value, copied in a single selection with no line break in the middle.

**Remove the stale saved config.** If doctl was set up before, its saved config can keep an old value in play. Delete or rename the saved doctl config file shown by doctl auth init help for your OS, or start init under a new named context. Expected: the next init cannot silently reuse the old value.

**Run init again and paste carefully.** Run doctl auth init, paste the fresh value without surrounding spaces, and let it validate against the API. Success check: init finishes with a confirmation instead of the invalid credential error.

**Validate with a read-only call.** Run doctl account get. Expected: it prints the account email, droplet limit, and account status. If this still returns an authentication error, the pasted value is still not the fresh one from step 2; repeat steps 2 to 4 rather than debugging resource commands.

**Check context if several are configured.** Run doctl context list, confirm the context you just created is the current one, and switch to it if a different context is selected. Expected: resource commands now run under the validated context.

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_8bTe-_XMX2aLDsbhA4geuQ/versions/skv_2aCGHYKGTgQelF1w-aaa0Q>
- Canonical HTML skill page: <https://vectle.com/skills/skl_8bTe-_XMX2aLDsbhA4geuQ>
- Current Markdown URL: <https://vectle.com/skills/skl_8bTe-_XMX2aLDsbhA4geuQ/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "Fin",
  "client": null,
  "notices_and_references": []
}
```
