开发者

Why do GitHub HTTPS schemes always ask for my password?

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 way to get git to开发者_运维知识库 cache my password?


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


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.


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜