Git push requires username and password

前端 未结 24 2496
灰色年华
灰色年华 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条回答
  •  萌比男神i
    2020-11-22 04:45

    If the SSH key or .netrc file did not work for you, then another simple, but less secure solution, that could work for you is git-credential-store - Helper to store credentials on disk:

    git config --global credential.helper store
    

    By default, credentials will be saved in file ~/.git-credentials. It will be created and written to.

    Please note using this helper will store your passwords unencrypted on disk, protected only by filesystem permissions. If this may not be an acceptable security tradeoff.

提交回复
热议问题