Claude Code SSH Authentication Issue
Claude Code's terminal doesn't handle interactive SSH prompts, making it impossible to push to Git repos when your SSH key has a passphrase. What happens:
bash git push origin main
⏺ Bash(git push origin main)
⎿ Error: [email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
⏺ Permission denied - you need to authenticate with GitHub first. You can
either:
1. Set up SSH keys: ssh-keygen -t ed25519 -C "[email protected]"
2. Use GitHub CLI: gh auth login
3. Use HTTPS with token: git remote set-url origin https://github.com/user/repo.git
The system gives helpful suggestions but doesn't handle the core issue: interactive SSH key passphrase prompts.
Root cause: The embedded terminal lacks proper PTY support for interactive password input.
Technical fix needed: Terminal implementation needs proper TTY raw mode support for secure password input.
+1
it doesnt have stdin capabilities which means we always are forced to find a < cli version> of whatever we need or build our own cli version all the time. i wonder if its a security measure or will they ever work toward supporting interactive capabilities.
My workout around is to get it to commit. Then in another terminal window I push... it's a small give up versus the benefit I have using it 🫶🏽
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/4592
- https://github.com/anthropics/claude-code/issues/2330
- https://github.com/anthropics/claude-code/issues/2640
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
This issue has been automatically closed as a duplicate of #4592.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.