claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Claude Code SSH Authentication Issue

Open magicmoam opened this issue 1 year ago • 6 comments

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.

magicmoam avatar Jul 03 '25 07:07 magicmoam

+1

clarkezone avatar Jul 08 '25 02:07 clarkezone

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.

Aze1339 avatar Jul 15 '25 16:07 Aze1339

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 🫶🏽

magicmoam avatar Jul 15 '25 18:07 magicmoam

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/4592
  2. https://github.com/anthropics/claude-code/issues/2330
  3. 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

github-actions[bot] avatar Aug 16 '25 04:08 github-actions[bot]

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

github-actions[bot] avatar Aug 20 '25 09:08 github-actions[bot]

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.

github-actions[bot] avatar Aug 28 '25 14:08 github-actions[bot]