git bitbucket.org push时不用每次输入密码
1. 设置环境变量 HOME 为
%USERPROFILE%
或在CMD下直接设置: setx HOME %USERPROFILE%
2. 查看远程路径
$ git remote -v
origin https://name@bitbucket.org/name/test.git (fetch)
origin https://name@bitbucket.org/name/test.git (push)
将上面的路径改为
$ git remote set-url origin https://bitbucket.org/name/test.git
3. 在C:\Users\Administrator 下新建文件 _netrc (linux下为 .netrc) 内容为:
machine bitbucket.org
login username
password youpassword