Getting permission denied (public key) on gitlab

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

    I found this after searching a lot. It will work perfectly fine for me.

    1. Go to "Git Bash" just like cmd. Right click and "Run as Administrator".
    2. Type ssh-keygen
    3. Press enter.
    4. It will ask you to save the key to the specific directory.
    5. Press enter. It will prompt you to type password or enter without password.
    6. The public key will be created to the specific directory.
    7. Now go to the directory and open .ssh folder.
    8. You'll see a file id_rsa.pub. Open it on notepad. Copy all text from it.
    9. Go to https://gitlab.com/profile/keys .
    10. Paste here in the "key" textfield.
    11. Now click on the "Title" below. It will automatically get filled.
    12. Then click "Add key".

    Now give it a shot and it will work for sure.

提交回复
热议问题