Getting permission denied (public key) on gitlab

前端 未结 30 2573
太阳男子
太阳男子 2020-12-02 04:27

My problem is that I can\'t push or fetch from GitLab. However, I can clone (via HTTP or via SSH). I get this error when I try to push :

Permission de

30条回答
  •  孤街浪徒
    2020-12-02 04:55

    In my case, it wasn't a gitlab problem, but a sshd configuration one. The ssh server didn't allow connection except for a list of users. The user git, the one connecting remotely to gitlab, wasn't in that list. So, check this before anything else.

    You can check your ssh server configuration in /etc/ssh/sshd_config. If you have a line with the option AllowUsers, add git to it:

    AllowUsers user1 user2 user3 git
    

提交回复
热议问题