Git: force user and password prompt

后端 未结 6 1682
小鲜肉
小鲜肉 2020-12-04 13:13

I recently updated my local Git installation to 1.8.1 from 1.8.0.1.

I\'m noticing that, when I work on GitHub, it doesn\'t prompt me for

6条回答
  •  无人及你
    2020-12-04 13:52

    This is most likely because you have multiple accounts, like one private, one for work with GitHub.

    SOLUTION On Windows, go to Start > Credential Manager > Windows Credentials and remove GitHub creds, then try pulling or pushing again and you will be prompted to relogin into GitHub

    SOLUTION OnMac, issue following on terminal:

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

    by replacing 'username' with your GitHub username in both places and providing your GitHub repo name.

提交回复
热议问题