1. 进入项目目录的.git目录

2. 使用git config --list查询当前配置

git config --list
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://e.coding.net/guoke3915/coding-demo/guoke3915.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master

3. 发现没有credential.helper=store

4. 所以打开./git/config文件最后加入

[credential]
    helper = store

5. 然后在项目中使用git pull,会输入账号密码,之后直接就不需要输入了

6. 如果不想保存,则删除即可