默认使用rsa算法,你也可以用比较详细的指令,如
ssh-keygen -t rsa -b 1024 -f yourkeyname -C "备注[email/...]"
参数 | 解释 |
---|---|
-b | 采用长度1024bit的密钥对,b=bits,最长4096,不过没啥必要 |
-t rsa | 采用rsa加密方式,t=type |
-f | 生成文件名,f=output_keyfiles |
-C | 备注,C=comment |
更多参数可运行 man ssh-keygen
Command line instructions
You can also upload existing files from your computer using the instructions below.
git之https或http方式设置记住用户名和密码的方法
https方式每次都要输入密码,按照如下设置即可输入一次就不用再手输入密码的困扰而且又享受https带来的极速
设置记住密码(默认15分钟):
git config --global credential.helper cache
如果想自己设置时间,可以这样做:
git config credential.helper 'cache --timeout=3600'
这样就设置一个小时之后失效
长期存储密码:
git config --global credential.helper store