首页 > 系统服务 > 详细

linux下每次git clone不需输入账号密码的方法

时间:2016-06-07 14:40:34      阅读:2468      评论:0      收藏:0      [点我收藏+]

在~/下, touch创建文件 .git-credentials, 用vim编辑此文件,输入内容格式:

ame@zhenyun ~ $touch .git-credentials

ame@zhenyun ~ $vim .git-credentials

在里面按“i”然后输入:https://{username}:{password}@github.com

比如 https://aoeddklj:1233ds@github.com

2. 在终端下执行

ame@zhenyun ~ $git config --global credential.helper store

3. 可以看到~/.gitconfig文件,会多了一项:

[credential]

helper = store

这个时候输入命令git clone http://username@url 时不需要输入密码,即可完成代码的git

linux下每次git clone不需输入账号密码的方法

原文:http://www.cnblogs.com/kb342/p/5566793.html

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