1、创建git-credentials
>vim .git-credentials
https://{username}:{password}@github.com #gitlab或github地址
2、执行git命令
>git config --global credential.helper store
>cat ~/.gitconfig
[credential]
helper = store
>vim .git-credentials
https://{username}:{password}@github.com #gitlab或github地址
>git config --global credential.helper store
>cat ~/.gitconfig
[credential]
helper = store