[Github] 本地git push免用户名和密码的配置
在终端通过git config --global命令进行配置
git config --global user.email "xxx@xxmail.com"
git config --global user.name "xxx"
git config --global credential.helper store # git push的时候记住用户名和密码
git config --global push.default simple #从Git .0之后,push.default的默认值由'matching'改为'simple'
这几个命令实际上在操作用户目录下的.gitconfig文件, 其内容如下:
$ cat ~/.gitconfig
[user]
email = xxx@xxmail.com
name = xxx
[credential]
helper = store
[push]
default = simple
另外,如果没有配置push.default这一项,git push的时候会提示以下信息,可以看到matching方式和simple方式的区别:
warning: push.default is unset; its implicit value has changed in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the traditional behavior, use: git config --global push.default matching To squelch this message and adopt the new behavior now, use: git config --global push.default simple When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name. Since Git 2.0, Git defaults to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch. See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
参考:
[Github] 本地git push免用户名和密码的配置的更多相关文章
- git push免输入账号和密码方法
最近在做些oj,所以需要频繁的git push提交代码,每次都要输入帐号和密码,感觉不舒服,于是乎就做了如下设置,然后就可以开心的提交啦- Linux或者Mac下方法: 创建文件,进入文件,输入内容: ...
- Git Push 避免用户名和密码方法
参考这里: http://www.cnblogs.com/ballwql/p/3462104.html 亲测第一种方法有效
- GIT(4)----免输入账号和密码方法
1.全局方式 包删除了,再次下载也不需要在配置输入密码和用户名 参考资料:git pull 和 git push免输入账号和密码方法 2.局部方式 包删除了,密码用户也会被删除,需要重新设置 打开终端 ...
- 使用git提交到github,每次都要输入用户名和密码的解决方法
使用git提交文件到github,每次都要输入用户名和密码,操作起来很麻烦,以下方法可解决,记录以下. 原因:在clone 项目的时候,使用了 https方式,而不是ssh方式. 默认clone 方式 ...
- git push 免密码
git push 免密码 通用情况 使用ssh协议 git add 使用tab键自动补全的中文文件名乱码 jupyter notebook 创建密码 git push 免密码 通用情况 1.使用文件创 ...
- 使用git提交代码到github,每次都要输入用户名和密码的解决方法
自从使用git提交代码到github后,发现自己使用git的功力增长了不少,但也遇到不少问题.比如,使用git提交代码到github的时候,经常要求输入用户名和密码,类似这种: 网上有这么一种解决方法 ...
- git 中添加用户名和密码
git 中添加用户名和密码:https://blog.csdn.net/qq_28602957/article/details/52154384 在使用git时,如果用的是HTTPS的方式,则每次提交 ...
- 宝塔webhook配合码云,本地git push 服务器自动pull
emmmm,这其实是一个很简单的一件事情,但是有很多坑,记录一下 先大概讲一下原理吧,就是每次您 push 代码后,都会给远程 HTTP URL 发送一个 POST 请求 更多说明 » 然后在宝塔这边 ...
- 让git push命令不再需要密码
最近利用jekyll写博客,为的就是博客管理方便,但是在上传博客的时候使用git push命令每次都得输入github帐号和密码特别的不方便,于是就搜了一下. 在这篇文章里提到,GitHub获得远程库 ...
随机推荐
- [BZOJ2809]dispatching
Description 在一个忍者的帮派里,一些忍者们被选中派遣给顾客,然后依据自己的工作获取报偿.在这个帮派里,有一名忍者被称之为 Master.除了 Master以外,每名忍者都有且仅有一个上级. ...
- java httpUtil
public class HttpUtils { public static String getContent(String url, Map<String, String> heads ...
- ETL增量处理总结
1 LOG表 1.1 思路 用log表记录业务库某表yw_tableA发生变化数据的主键.数据进入BI库目标表bi_tableA前,先根据log表记录的主键进行delete. 1.2 设计 1.2.1 ...
- POJ - 3169 差分约束
题意:n头牛,按照编号从左到右排列,两头牛可能在一起,接着有一些关系表示第a头牛与第b头牛相隔最多与最少的距离,最后求出第一头牛与最后一头牛的最大距离是多少,如 果最大距离无限大则输出 ...
- PRcurve
https://blog.csdn.net/qq_33350808/article/details/83178002 问题:删掉pkl
- 梅森素数 判定总结 - Lucas-Lehmer算法 & Miller-rabin算法
梅森素数 定义: if m是一个正整数 and 2^m-1是一个素数 then m是素数 if m是一个正整数 and m是一个素数 then M(m)=2^m-1被称为第m个梅森数 if p是一个素 ...
- bzoj 1192 鬼谷子的钱袋 数学
1192: [HNOI2006]鬼谷子的钱袋 Time Limit: 10 Sec Memory Limit: 162 MB Description 鬼谷子非常聪明,正因为这样,他非常繁忙,经常有各 ...
- Struts2框架学习第一章——Struts2概述
本章要点 — Web应用的发展 — Model 1和Model 2 — MVC思想 — MVC模式的优势 — 常用MVC框架及其特征 — Struts 1的基本结构及其存在的问题 — We ...
- Sql类型
1.varchar和nvarchar的区别:varchar(n)长度为n个字节的可变长度且非Unicode的字符数据.n 必须是一个介于 1 和 8,000 之间的数值.存储大小为输入数据的字节的实际 ...
- NSMutableString和NSString区别,及相互转换方法
NSString是一个不可变的字符串对象.这不是表示这个对象声明的变量的值不可变,而是表示它初始化以后,你不能改变该变量所分配的内存中的值,但你可以重新分配该变量所处的内存空间.而NSMutableS ...