Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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/id_rsa.pub

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/id_rsa.pub': 
Enter passphrase for key '/home/hbrown/.ssh/id_rsa.pub': 
Enter passphrase for key '/home/hbrown/.ssh/id_rsa.pub': 
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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.