码迷,mamicode.com
首页 > 系统相关 > 详细

Linux和 Mac下git pull/push 免输入密码和账号

时间:2018-01-18 00:50:32      阅读:686      评论:0      收藏:0      [点我收藏+]

标签:pass   创建   hub   --   命令   div   github   body   user   

linux下面可以直接创建.git-credential文件,命令如下:

创建文件,进入文件,输入内容:

cd ~
touch .git-credentials
vim .git-credentials
https://{username}:{password}@github.com

在终端下输入:

git config --global credential.helper store

打开~/.gitconfig文件,会发现多了一项:

[credential]
helper = store

注:设置好后第一次执行需要输入,以后就不需要了

Linux和 Mac下git pull/push 免输入密码和账号

标签:pass   创建   hub   --   命令   div   github   body   user   

原文地址:https://www.cnblogs.com/zouzhe0/p/8306858.html

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