Getting permission denied (public key) on gitlab

前端 未结 30 2524
太阳男子
太阳男子 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:47

    I solved git@gitlab.com: Permission denied (publickey) issue using following instructions

    1. RUN cat ~/.ssh/id_rsa.pub
    2. Copy id_rsa.pub (public key) to your getlab `Setting -> SSH Keys
    3. RUN cat ~/.ssh/id_rsa
    4. Copy id_rsa (private key) to `Code_repo->git_auth->id_rsa

    NOTE: Take care of the machine user if you are using root user in your DockerFile or anywhere else then use sudo su before running the above commands to get root user public and private keys.

提交回复
热议问题