Git: Permission denied (publickey) fatal - Could not read from remote repository. while cloning Git repository

后端 未结 30 2064
青春惊慌失措
青春惊慌失措 2020-12-12 10:10

I am unable to clone a Git repository, and getting this error:

krishna.soni@KRISHNACHANDRAS /c/Projects $ git clone http://stage.abc.com:10088/pqr
http://<         


        
30条回答
  •  长情又很酷
    2020-12-12 10:40

    I was facing the same issue while setting up ssh for gitlab. I already have ssh for github and i could not overwrite that. The steps that worked for me are :

    1. Generate SSH with new path and add it to ssh list ssh-add /path/to/new/id_rsa.
    2. Create a file named config in ~/.ssh/ using. I used vi ~/.ssh/config/.
    3. Add this to the newly created file

    # GitLab.com server Host gitlab.com RSAAuthentication yes IdentityFile /path/to/new/id_rsa

    1. Save and quit.

    After that restart the terminal and try pushing, it should work

提交回复
热议问题