I cannot clone or push to a repository on my server.
I have a bare repo that is located is a directory user@host
in directory home/user/test.git
that I am trying to access via git clone
. I used ssh-add <pathtokey>
to add my ssh key. It asked me for the passphrase. I can then ssh user@host
successfully.
However if I then try to git clone ssh://user@host/~/test.git
I get:
Cloning into 'test'...
user@host: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
also tried
git clone ssh://user@host/home/user/test.git
git clone user@host:home/user/test.git
git clone user@host:/home/user/test.git
with the same result
I am guessing the git credential manager isn't picking up the keys?
On the server /var/auth/log
says
Feb 20 02:25:36 xxxxx sshd[24674]: Connection closed by authenticating user XXXX x.x.x.x port 56433 [preauth]
- Git version:
git version 2.30.1.windows.1
- Git Credential Manager:
Git Credential Manager version 2.0.318-beta+44acfafa98 (Windows, .NET Framework 4.0.30319.42000)
git config -l
reportscredential.helper=manager-core
- Tried both
PowerShell
andgit bash
shells, same result user
has read, execute permissions to the repo