Linux下 保存 git账号密码
2016-09-02 14:23
239 查看
一、通过文件方式
1.在~/下, touch创建文件 .git-credentials, 用vim编辑此文件,输入内容格式:
在里面按“i”然后输入: https://{username}:{password}@github.com
比如 https://account:password@github.com
2. 在终端下执行
3. 可以看到~/.gitconfig文件,会多了一项:
4.OK
二、通过缓存方式
要求:git版本需要>=1.7.10
1.在~/下, touch创建文件 .git-credentials, 用vim编辑此文件,输入内容格式:
touch .git-credentials vim .git-credentials
在里面按“i”然后输入: https://{username}:{password}@github.com
比如 https://account:password@github.com
2. 在终端下执行
git config --global credential.helper store
3. 可以看到~/.gitconfig文件,会多了一项:
[credential] helper = store
4.OK
二、通过缓存方式
要求:git版本需要>=1.7.10
git config --global credential.helper cache # 默认缓存密码15分钟,可以改得更长, 比如1小时 git config --global credential.helper 'cache --timeout=3600'
相关文章推荐
- Linux下 保存 git账号密码
- linux下git怎么保存账号密码
- Linux下 保存 git账号密码
- Linux下 保存 git账号密码
- linux下每次git clone不需输入账号密码的方法
- linux清除git账号密码
- linux git push pull免账号密码
- 解决git 每次使用都需要输入账号密码 ( Windows和linux)
- linux下,每次git pull 或者git push都需要输入账号密码的问题以及git remote 的一些基本操作
- windows删除或修改本地Git保存的账号密码
- git在linux和windows下保存默认的用户名和密码
- windows 和 linux下 清除svn保存的账号密码信息。
- linux git 保存用户名和密码
- Git 使用技巧 - 自动保存自己的账号密码
- 删除或修改本地Git保存的账号密码
- windows 保存git的账号密码
- linux git pull/push时提示输入账号密码之免除设置
- linux下使用git来pull和push时免输账号密码
- windows下git保存全局账号密码. git bash
- Windows下保存git账号密码实现免输入