首页 > 其他 > 详细

git记住用户名和密码适用于git bash 和码云

时间:2018-10-28 10:21:03      阅读:245      评论:0      收藏:0      [点我收藏+]

HOME目录中,一般为C:\users\Administrator,也可以是你自己创建的系统用户名目录,反正都在C:\users***中。

创建.git-credentials文件。

技术分享图片

使用git bash 输入下面命令行即可创建

touch .git-credentials

创建完成后,

如果是github在该文件中输入:

https://username:password@github.com

如果是码云的为:

https://username:password@gitee.com

注:username对应你的用户名,password对应你的密码

 

然后再进入git bash中输入下面命令行

git config --global credential.helper store

store为永久存储,当然也可以设置临时的

git config –global credential.helper cache

默认为15分钟,如果想设置保存时间的话,可以输入:

git config credential.helper ‘cache –timeout=3600’

  

 

git记住用户名和密码适用于git bash 和码云

原文:https://www.cnblogs.com/ylz-blog/p/9864601.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!