You are not logged in.
Hi,
what I want to do is access a repository on a remote Arch Linux machine with git over ssh. On that machine a 'git' user is already present due to the git-package. The passwd entry of that user is
git:x:999:999:git daemon user:/share/git:/bin/bashAs you can see I assigned
/share/gitas home directory to that user. According to this guide creating a .ssh directory with an authorized_keys file and adding my public key to that file is sufficient but I still get prompted for a password.
For example the git repository my_repo.git in /share/git/my_repo.git can be cloned with the command line
git clone git@my_machine:my_repo.gitbut I get a password prompt for the git user.
It seems not to be a problem of the sshd daemon since I can login on other users with the same method without being password prompted. So I'm running out of ideas and help is much appreciated.
Offline
Who owns /share/git? What are the permissions of /share and of /share/git?
Note that Arch does not (by default) have a /share node so I assume you created it.
Can git log in at the console of your computer?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
You want to read up on 'ssh-agent' and 'ssh-add'.
Or you create a SSH key pair without a password.
1000
Offline
Wait. Which is happening? The ssh client cannot find the private key and is falling back to password? Or is the key is protected by a pass phrase? I thought the former.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
git clone git@my_machine:my_repo.gitbut I get a password prompt for the git user.
Show us the full output of the command.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Note that Arch does not (by default) have a /share node so I assume you created it.
Yes I created that node and I figured out that the share node had a wild sticky bit for group write permission which was inherited by the git directory. Apparently the ssh daemon doesn't like that due to it's "StrictModes yes" setting. I removed the sticky bit and everything was fine. I reproduced the behavior and took a look into the journal and it's also logged there. The log entry is "Authentication refused: bad ownership or modes for directory".
So the solution was easy thanks for all your time and help.
Offline