work:git-config
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| work:git-config [2010/06/28 09:21] – created percy | work:git-config [2016/05/05 13:07] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Windows上git的配置====== | ====== Windows上git的配置====== | ||
| + | |||
| 在Windows上使用git需要一些特殊的配置. | 在Windows上使用git需要一些特殊的配置. | ||
| + | git config --global user.name " | ||
| + | git config --global user.email " | ||
| + | |||
| 最近从github.com上clone代码, | 最近从github.com上clone代码, | ||
| + | |||
| 出现这个问题就是crlfd做怪了, | 出现这个问题就是crlfd做怪了, | ||
| + | |||
| git config --global core.autocrlf false | git config --global core.autocrlf false | ||
| + | |||
| | | ||
| + | |||
| 如果要查看当前的配置: | 如果要查看当前的配置: | ||
| + | |||
| git config -l | git config -l | ||
| + | |||
| < | < | ||
| + | |||
| $ git config -l | $ git config -l | ||
| + | |||
| core.symlinks=false | core.symlinks=false | ||
| + | |||
| core.autocrlf=true | core.autocrlf=true | ||
| + | |||
| color.diff=auto | color.diff=auto | ||
| + | |||
| pack.packsizelimit=2g | pack.packsizelimit=2g | ||
| + | |||
| help.format=html | help.format=html | ||
| + | |||
| http.sslcainfo=/ | http.sslcainfo=/ | ||
| + | |||
| sendemail.smtpserver=/ | sendemail.smtpserver=/ | ||
| + | |||
| user.name=Percy Peng | user.name=Percy Peng | ||
| + | |||
| user.email=Percy.Peng@qisda.com | user.email=Percy.Peng@qisda.com | ||
| + | |||
| core.autocrlf=false | core.autocrlf=false | ||
| + | |||
| </ | </ | ||
| + | |||
| ====== 参考 ====== | ====== 参考 ====== | ||
| + | |||
| http:// | http:// | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ====== Gentoo上git ====== | ||
| + | |||
| + | 我需要在宿舍电脑上也能够clone代码,这就需要添加另外一个key了。 | ||
| + | |||
| + | 参考:http:// | ||
| + | |||
| + | 之前如果已经存rsa的话,需要先记着备份。 | ||
| + | |||
| + | |||
| + | |||
| + | 创建命令: | ||
| + | |||
| + | ssh-keygen -t rsa -C " | ||
| + | |||
| + | 然后将id_rsa.pub添加到github帐户中去。 | ||
| + | |||
| + | 然后我想着这个时候应该可以clone了吧,试了下不行, | ||
| + | |||
| + | Cloning into DellStage... | ||
| + | |||
| + | Agent admitted failure to sign using the key. | ||
| + | |||
| + | Permission denied (publickey). | ||
| + | |||
| + | fatal: The remote end hung up unexpectedly | ||
| + | |||
| + | 这个时候还需要将这个生成的key添加到系统中去, | ||
| + | |||
| + | ssh-add id_rsa | ||
| + | |||
| + | 再clone一下,OK了。 | ||
| + | |||
| + | |||
/var/www/dokuwiki/wiki/data/attic/work/git-config.1277688109.txt.gz · Last modified: 2016/05/05 13:06 (external edit)
