Git push requires username and password

前端 未结 24 2503
灰色年华
灰色年华 2020-11-22 04:14

I cloned a Git repository from my GitHub account to my PC.

I want to work with both my PC and laptop, but with one GitHub account.

When I try to push to or p

24条回答
  •  执笔经年
    2020-11-22 04:50

    I had the same issue.

    So I changed the .git/config file from my project,

    url = https://github.com//
    

    to

    url = git@github.com:/
    

    and added the SSH public key to the Git profile which is in setting.

    For the SSH public key:

    cat ~/.ssh/id_rsa.pub
    

提交回复
热议问题