Reputation: 57881
I'm trying to push to git server:
git remote add origin ssh://[email protected]:9922/test
git push
Here's the response:
[email protected]'s password:
I'm typing in the password for my ssh key, but it fails. I've even checked correctness of the password using this method.
After three failed attempts, the server responds:
Permission denied (publickey,password).
fatal: Could not read from remote repository.
Does that mean that the repository is also password-protected, not only ssh-protected? Or is this just ssh authentication not working?
Upvotes: 1
Views: 140
Reputation: 47022
I'm typing in the password for my ssh key, but it fails. I've even checked correctness of the password using this method.
That's part of the problem. It's not prompting you for the password of your key, it's prompting you for [email protected]'s password. In other words, it's prompting the password for the git user on git.example.com--not the for the passphrase of your key.
This is generally a sign that you've set something up wrong. Generally, your public key needs to be added somewhere, which will ultimately make its way to the authorized_keys file (depending on how the service is implemented). At that point, the service will recognize your key and ask to do the exchange, which will then cause it to prompt for the passphrase for the key (assuming that you haven't added it a running ssh-agent).
How exactly to go about doing that really depends on the service running on the other end. So without any other information, the only advice I can offer is to check the documentation for that service.
Upvotes: 1
Reputation: 56442
Git by itself doesn't use any auth method.
Check your ssh server configuration, you can look at theses files on the remote server:
/home/git/.ssh/authorized_keys
/etc/ssh/sshd_config
And maybe others depending of your ssh server configuration.
Upvotes: 0