TortoiseGit 链接oschina不用每次输入username和password的方法

每次git clone 和push 都要输入username和password。尽管安全。但在本机上每次都输有些麻烦,怎样记住username和password呢?git

在网上看了各类方法,太杂,很是多可能环境不同。一直行不通。最后找到一种有效的方法,很是easy。记录下来!安全


当你配置好git后,在C:\Documents and Settings\Administrator\ 文件夹下有一个  .gitconfig 的文件。里面会有你先前配好的name 和email,仅仅需在如下加一行.net

[credential]    
    helper = store 


下次再输入username 和password 时。git就会记住,从而在C:\Documents and Settings\Administrator\ 文件夹下造成一个  .git-credentials 文件,里面就是保存的你的username和password。

https://username:12345678@git.oschina.net
这样之后再链接git.oschina 代码库时,就不用再输入username和password了!
相关文章
相关标签/搜索