首页 > 其他 > 详细

git config(转载)

时间:2014-03-12 16:27:35      阅读:428      评论:0      收藏:0      [点我收藏+]

From:http://www.g2w.me/2013/10/cache-github-credential-for-https-repository/

git config --system  配置全局           对应/root/.gitconfig文件

git config --global   配置当前用户      对应

git config               配置当前版本库   对应版本库下.git/config

 

bubuko.com,布布扣
git config  user.name <username>
git config user.email  <email>
git config core.editor  vim
git config core.color   auto
bubuko.com,布布扣

 

配置http仓库密码

使用http地址访问仓库时,每次进行push操作都会提示输入用户名和密码,比较麻烦。可以进行配置。

对于1.7.9及之后的版本

git config --global credential.helper cache

如果需要加上失效时间,可以如下配置

git config credential.helper cache --timeout=3600

则密码会在1小时后失效

对于1.7.9之前的版本

需要显式的在git地址中加入用户名和密码,如https://you:password@github.com/you/example.git

bubuko.com,布布扣
git config remote.origin.url https://you:password@github.com/you/example.git
bubuko.com,布布扣

git config(转载),布布扣,bubuko.com

git config(转载)

原文:http://www.cnblogs.com/xiaoerlang/p/3595586.html

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