linux下每次git clone不需输入账号密码的方法
2016-06-07 14:09
471 查看
在~/下, 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
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 个人学习笔记(没有干货)
- linux基础命令
- 如何量身打造基于CentOS的产品镜像
- Linux使用yum安装JDK
- vi全局替换方法
- C 读文件 Windows 与 Linux 的差别
- 嵌入式Linux裸机开发(六)——S5PV210时钟系统
- Centos7服务器的初步流程(SSH基本配置)
- Linux中tail与cat的区别
- Linux: hrtimer 用法
- linux内核研究(一)
- LINUX 内核调试基础+编程基础
- Linux之Ganglia源码安装
- linux常用命令
- Linux之read命令使用
- linux下如何部署(执行)java jar包,并关闭此jar的进程
- linux基础(37)--xfs文件系统的备份和恢复--RHEL7.2
- 【Linux】U盘安装Centos6.3遇到的两个重要问题及其解决方法
- Linux驱动学习笔记之一——高精度定时器(1)
- Linux驱动学习笔记之一——高精度定时器2