Git push requires username and password

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

    Here's another option:

    Instead of writing

    git push origin HEAD
    

    You could write:

    git push https://user:pass@yourrepo.com/path HEAD
    

    Obviously, with most shells this will result in the password getting cached in history, so keep that in mind.

提交回复
热议问题