git config git ssh git https
2017-07-09 13:18
169 查看
https方式每次都要输入密码,按照如下设置即可输入一次就不用再手输入密码的困扰而且又享受https带来的极速
设置记住密码(默认15分钟):
如果想自己设置时间,可以这样做:
这样就设置一个小时之后失效
长期存储密码:
增加远程地址的时候带上密码也是可以的。(推荐)
补充:使用客户端也可以存储密码的。
如果你正在使用ssh而且想体验https带来的高速,那么你可以这样做: 切换到项目目录下 :
移除远程ssh方式的仓库地址
增加https远程仓库地址
搞定,enjoy the speed!
设置记住密码(默认15分钟):
git config --global credential.helper cache
如果想自己设置时间,可以这样做:
git config credential.helper 'cache --timeout=3600'
这样就设置一个小时之后失效
长期存储密码:
git config --global credential.helper store
增加远程地址的时候带上密码也是可以的。(推荐)
http://yourname:password@git.oschina.net/name/project.git
补充:使用客户端也可以存储密码的。
如果你正在使用ssh而且想体验https带来的高速,那么你可以这样做: 切换到项目目录下 :
cd projectfile/
移除远程ssh方式的仓库地址
git remote rm origin
增加https远程仓库地址
git remote add origin http://yourname:password@git.oschina.net/name/project.git
搞定,enjoy the speed!
相关文章推荐
- GitHub https 请求在git config 中添加用户名密码的格式
- Windows下git web hook免除密码输入的烦人事(SSH和HTTPS)
- git 添加ssh-key查看config
- 如何通过ssh的方式连接git及修复yosemite的git版本的https问题
- git ssh 22 端口不可用时通过https 443 端口配置git ssh
- github上git clone时ssh和https的
- GIT 由https切换到SSH
- Git使用手册:HTTPS和SSH方式的区别和使用
- git .ssh/config 文件配置 修改端口号等
- github上git clone中 https与ssh的区别
- git 添加ssh-key查看config
- git中ssh与https究竟有何不同
- [Jenkins][Git]ssh原理以及与https的区别
- Git使用手册:HTTPS和SSH方式的区别和使用
- git 添加ssh-key查看config
- Spring Cloud Config Server基于本地git使用SSH clone github repository
- git:https与ssh的使用区别
- [Jenkins][Git]ssh原理以及与https的区别
- Git:从ssh切换回https
- git操作之ssh与https互换