Git push requires username and password

前端 未结 24 2096
灰色年华
灰色年华 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:37

    This is what worked for me:

    git remote set-url origin https://username@github.com/username/reponame.git
    

    Example:

    git remote set-url origin https://jsmith@github.com/jsmith/master.git
    

提交回复
热议问题