Does Windows cache SSH keys?

后端 未结 1 436
傲寒
傲寒 2021-01-16 05:21

I recently posted a question regarding Git Bash referencing an old GitHub account username. Refer to that post here: Original Post

Now I\'m completely convinced that

1条回答
  •  走了就别回头了
    2021-01-16 06:04

    I think the key here is that you might be using HTTPS to clone the new repository which in turn does not use the SSH keys at all for authentication.

    I suspect that your credentials are being cached by the credentials helper. See this:

    https://help.github.com/articles/caching-your-github-password-in-git/#platform-windows

    On windows, if you've used the wincred helper (git config --global credential.helper wincred), then this stores your credentials in the Windows credential store which has a Control Panel interface where you can delete or edit your stored credentials. See this for instance:

    With this store, your details are secured by your Windows login and can persist over multiple sessions. This was added in Git for Windows 1.8.1.1.

    So either:

    1. Try clearing the credential cache for your https cloned repo using the following and try again:

      git credential-osxkeychain erase host=github.com protocol=https

    OR,

    1. Edit the credentials using the Windows control panel's Credential Manager.

    And then try pushing to your HTTPS-cloned repository again when you should get prompted for authentication details again.

    0 讨论(0)
提交回复
热议问题