GitLab requires git@localhost password to push to a repo

前端 未结 15 2041
梦毁少年i
梦毁少年i 2020-12-30 03:38

I\'m trying to get GitLab up and running on my server. I followed the installation instructions at the gitlab github page and everything went well.

The issue is, whe

15条回答
  •  没有蜡笔的小新
    2020-12-30 03:51

    I ran into the same issue recently, and discovered that the issue for me was that SELinux was preventing sshd from accessing to the authorized_keys file in gitlab's data directory /var/opt/gitlab/.

    To fix this, edit /etc/selinux/targeted/contexts/files/file_contexts.homedirs and add the line:

    /var/opt/gitlab/\.ssh/.*    system_u:object_r:ssh_home_t:s0
    

    Then run:

    $ restorecon -Rv /var/opt/gitlab
    

    Source : https://serverfault.com/questions/50573/selinux-preventing-passwordless-ssh-login

提交回复
热议问题