在终端输入: git config --global credential.helper store 1 1 然后git pull一次,输入一次用户名密码就会自动保存该用户名密码; 亲测有效,不然可能每次都要输入username 和 password