git 免密码 push 本地仓库到远程库

1.在~/下, touch 创建文件 .git-credentials

cd ~
touch .git-credentials

2.vim 编辑 .git-credentials,在.git-credentials文件中输入:

https://{username}:{password}@github.com

比如你github的用户名为:kkxx, 密码为:123456,则输入:https://kkxx:123456@github.com

3.在终端下输入:

git config --global credential.helper store

4.可以看到~/.gitconfig文件,会多了一项:

[credential]
        helper = store

通过如上几个步骤,你可以进行无密码push本地库到远程库啦。

 

参考博文:http://blog.csdn.net/kevinew/article/details/24588123/

 

posted @ 2018-01-12 15:43  大鱼海棠兮  阅读(196)  评论(0编辑  收藏  举报