git bash避免每次提交都要输入密码

记住密码的方式:http://【账号】:【密码】@【ip】:【port】/【项目路径】/【.git文件】
url举例:http://username:[email protected]:8888/demo/demo.git

  • https方式:

    git bash中配置

    	git config --global credential.helper store
    

    与直接打开电脑.gitconfig写入[credential]配置效果一样:

    在 C:Usersyour name 目录下找到到 .gitconfig 这个文件,使用编辑器打开

    	[user]
    	   name = ****
    	   email = ********.com
    	[credential]
    	   helper = store
    

    文件中增加 [credential]配置

    	[credential]
    	   helper = store
    
  • ssh方式:

    git远程仓库中配置ssh公钥。以前有说过这个!!!

猜你喜欢

转载自blog.csdn.net/weixin_43106777/article/details/121540736
今日推荐