Git push requires username and password

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

    For Windows Git users, after running git config --global credential.helper store, if it still prompts for a password, you'd better check where the configuration file is written to, using this command

    git config --list --show-origin
    

    In my case, after manually editing configuration file 'C:\Program Files\Git\mingw64\etc\gitconfig', and adding the following text, it worked.

    [credential]
        helper = store
    

提交回复
热议问题