Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I am logged into my machine directly, I can do all git operations, and when prompted for a password, the password is accepted. When I ssh into the same box and run git operations on the same repos, the password is rejected.

Relevant section of .ssh/config looks like this:

# Generic settings
Host *
    ServerAliveInterval 600
    ControlPath /tmp/ssh-%r@%h:%p
    ControlMaster auto
    KeepAlive yes
    IdentityFile ~/.ssh/

Transaction looks like this when I login when I ssh into my box:

{12-12-03 9:41}hbrown-wks2:~/workspace/spt/project@master✗✗✗ hbrown% git pull
Enter passphrase for key '/home/hbrown/.ssh/': 
Enter passphrase for key '/home/hbrown/.ssh/': 
Enter passphrase for key '/home/hbrown/.ssh/': 
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Using bash does not appear to make a difference (i.e. ssh-agent /bin/bash).

This is a recent development, but I can't cite the change that caused it.

share|improve this question
up vote 2 down vote accepted

Do you mean passphrase (to be used with public key encyptiuon) or password? You aren't even being asked for a password. If you want password acceptance in addition to passphrase you may need something like:

PreferredAuthentications publickey,keyboard-interactive,password

in your ssh_config.

Also, isn't the IndentityFile supposed to be the private key and not the public key?

share|improve this answer
So the problem was that I was specifying the public key as the identity file... I'm not sure why this worked in the general case. – user20342 Dec 3 '12 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .