Git push requires username and password

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

    What worked for me was to edit .git/config and use

    [remote "origin"]
            url = https://:@gitlab.com(...).git
    

    It goes without saying that this is an insecure way of storing your password but there are environments/cases where this may not be a problem.

提交回复
热议问题