码迷,mamicode.com
首页 > 其他好文 > 详细

Meth | Git 避免重复输入用户名和密码方法

时间:2018-11-05 15:14:07      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:lob   github   glob   用户名   config文件   tps   文本   输入   http   

git config --global credential.helper store

 

 

1.2 添加Git Config 内容

进入git bash终端, 输入如下命令:

git config --global credential.helper store

执行完后查看%HOME%目录下的.gitconfig文件,会多了一项:

[credential]

    helper = store

重新开启git bash会发现git push时不用再输入用户名和密码

说明:经测试,可以直接进行第二步,在git中对远程进行访问时会提示输入一次用户名与密码,此时会默认在相应路径下(%HOME%)创建.git-credentials文件,内容为类似https://{username}:{password}@github.com的文本。以后便不会再要求提示啦。

Meth | Git 避免重复输入用户名和密码方法

标签:lob   github   glob   用户名   config文件   tps   文本   输入   http   

原文地址:https://www.cnblogs.com/PlusHappy/p/9909060.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!