Why do GitHub HTTPS schemes always ask for my password?

前端 未结 3 694
终归单人心
终归单人心 2020-12-19 09:11

I cloned a repo at git hub via the https:// protocol to avoid setting up the SSH key stuff. This is all good except every time I push it asks for my password. Is there any

相关标签:
3条回答
  • 2020-12-19 09:26

    You will see an ssh-agent to store the password. There are ways to cache your password listed here.

    0 讨论(0)
  • 2020-12-19 09:37

    Use an authentication token in ~/.netrc file, typing password can be avoided.

    Recently github added the token feature. Go to settings/applications then create a personal access token. The syntax in netrc is one-line: machine github.com login <login> password <token>.

    Even better feature, the token is intended to allow users not use the account password for project work. Only use the password when doing admin work, like creating new token or revoke an old token.

    See another SO post for ways of credential caching: Is there a way to skip password typing when using https:// github

    0 讨论(0)
  • 2020-12-19 09:48

    You may want GitHub's credential caching for Smart HTTP. According to the blog post, it only works with Windows and OS X, so you should use the GIT protocol instead if you're on a Linux or Unix workstation.

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