GitHub Actions: Error: Cannot perform an interactive login from a non TTY device
docker login asked for a password interactively, but CI has no terminal — pass credentials non-interactively.
Cannot perform an interactive login from a non TTY deviceError: Cannot perform an interactive login from a non TTY devicedocker login non TTYdocker login --password-stdin CI Meaning
In CI, supply the password via stdin with --password-stdin, or use docker/login-action. The error also appears when the secret is empty, because docker then falls back to prompting.
Common causes
docker login -u userwithout a password- Password secret empty (so docker prompts)
- Old tutorial using
-p(insecure, may be blocked) - Wrong registry URL in the command
- Missing
--password-stdinpipe
⚡ Quick fix
- Use
docker/login-actionwith secrets - Or
echo "$TOKEN" | docker login ghcr.io -u "$USER" --password-stdin - Confirm the secrets exist and are not empty
Detailed fix by platform
GitHub Actions
uses: docker/login-action@v3withregistry,usernameandpassword- For GHCR use
password: ${{ secrets.GITHUB_TOKEN }}andpermissions: packages: write
Code examples
Non-interactive login
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}How to diagnose
- Command — Password via stdin?
- Secret — Non-empty?
- Registry — Correct host?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- API rate limit exceeded GitHub Actions: HttpError: API rate limit exceeded for installation ID 123456 / secondary rate limit
- Cache not found / Unable to reserve cache GitHub Actions: Cache not found for input keys: npm-Linux-abc123 / Failed to save: Unable to reserve cache with key, another job may be creating this cache
- Cannot connect to the Docker daemon (GitLab) GitLab CI: Cannot connect to the Docker daemon at tcp://docker:2375. Is the docker daemon running?
Most viewed in CI/CD
- The process '/usr/bin/git' failed with exit code 128 GitHub Actions: Error: The process '/usr/bin/git' failed with exit code 128
- This job is stuck because you don't have any active runners GitLab CI: This job is stuck because you don't have any active runners online or available with any of these tags assigned to them
- ComparisonError: manifest generation failed Argo CD: ComparisonError: rpc error: code = Unknown desc = Manifest generation error (cached): kustomize build failed
Other ways to find it
Where this error sits
Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 25 Oct 2026